Munster trailed 6-3 at the interval, Gavin Henson kicking two from three as opposed to a solitary O'Gara strike.
A more purposeful Munster dominated the second half against an Ospreys side reduced to 14 after the dismissal of their number 8 Ryan Jones just before the break.
However, it was the visitors who extended their lead with a 45th minute Henson penalty before O'Gara cancelled out that score with his second penalty five minutes later.
Munster continued to exert pressure on the Ospreys line and a series of five metre scrum inexplicably resulted in a penalty to the Welsh before the Munster pack rumbled their way to the line on the opposite side of the field with Sheahan bursting over for the try.
This victory, Munster's 8th consecutive Celtic League win, puts them joint top on 39 points alongside The Ospreys.