The Northern Irish province were trailing 13-3 with 56 minutes on the clock, but replacements that included All Black prop John Afoa and British Lion Stephen Ferris made a major impact as the Ulstermen made it two wins from two.
The Ospreys looked set to atone for their opening defeat in Treviso as a fine solo try from Hanno Dirksen and eight points from the boot of fly-half Matthew Morgan appeared to put them in control.
But they crumbled badly late in the second half with their scrum coming under huge pressure from Ulster's reinforced pack.
Brendan Macken's last-minute try rounded off a satisfying 45-25 win for Leinster over Newport Gwent Dragons at the RDS.
The sides shared out eight tries and 70 points on a hot September evening, with Ian Madigan landing seven kicks out of eight for an 18-point return.
Madigan helped Leinster take a 26-13 half-time lead as they sandwiched Steffan Jones's intercept try with efforts from Andrew Conway and Ben Marshall.
Shane Jennings and Fionn Carr touched down to seal the province's bonus point, but the Dragons drew some inspiration from Tom Prydie and Dan Evans scores.
Joe Schmidt's men hit back right at the death as Macken intercepted Evans's pass to race clear and in under the posts.