Steve Tandy's side scored three tries at the Stadio XXV Aprile, while fly-half Dan Biggar claimed 24 points.
He opened the proceedings with a sixth-minute penalty and, after Gonzalo Garcia had levelled, he pushed his side out to 9-3 with two more three-pointers.
Zebre's Alberto Chillon was then sent to the sin-bin and Richard Fussell made the most of his absence by grabbing his side's first try.
Biggar converted and, when Jonathan Thomas went in as well, the Ospreys led 21-6 at the break, with Daniel Halangahu scoring a penalty on the whistle.
Luca Redolfini then touched down (43) and when Halangahu converted it was 21-13, before he and Biggar traded penalties.
The Wales international would have the last word, though, scoring a fifth penalty before converting his own try inside the last quarter.
Ulster stayed top of the RaboDirect Pro12 table after seeing off Connacht with a comfortable 25-0 victory to make it five wins from five games.
Ulster's win was forged off a dominant scrum and a penalty try along with another Nick Williams score came off the set-piece in the first half, before substitute Luke Marshall got over in the closing minutes.
Fly-half Paddy Jackson kicked 10 points and converted all four of his kicks at goal while Connacht, though they tried to replicate last week's stunning win over Leinster, just could not live with Ulster's power up front.
Tries by Gareth Maule and Morgan Stoddart helped Scarlets to a scrappy 24-13 RaboDirect PRO12 victory over Newport Gwent Dragons at a rain-drenched Parc y Scarlets.
Maule crossed in the first half for an enterprising try after chasing up a loose ball from a missed penalty goal, while Stoddart came on at half-time to end more than year out with a broken leg, and soon went over in the left corner.
Aled Thomas kicked 11 points for Scarlets with Rhys Priestland adding another penalty.
Adam Hughes scored the only try for the Dragons which was converted by Tom Prydie who also kicked a penalty along with Steffan Jones.
Treviso posted their third win of the season - and their first on the road - when they saw off Edinburgh 27-22 in a match where the main talking point was the interpretation of the scrum laws by the Italian referee Matteo Liperini.
The rookie official, in charge of his first match, penalised Edinburgh at 10 scrums in the first half, then found the Italians guilty of a similar crime count in the second period.
Man of the match Robert Barbieri crossed twice for the visitors, in addition to a penalty try and a string of kicks by Alberto Di Bernardo, while the hosts responded through touchdowns by Tim Visser, Lee Jones and Dougie Fife, with Greig Laidlaw booting the other points.