Shane Williams, Mark Jones, Tom Shanklin and Sonny Parker were all out injured while Gareth Thomas was hit with a four-week ban. Wales coach Gareth Jenkins was forced to make a drastic re-shuffle to his options behind the scrum.
Wales got off to the worst possible start when Ireland found their way over the try line inside the first minute. Chris Czekaj was forced to retreat by Peter Stringer's probing kick but Stephen Jones saw his clearance blocked by opposing captain Brian O'Driscoll, Irish hooker Rory Best scooped up the loose ball and stormed over on 48 seconds.
O'Gara missed the conversion and Jones hit back, following up on his own break, with a penalty on 11 minutes to reduce the deficit following Martyn Williams's steal at the lineout.
Gordon D'Arcy was Ireland's principle threat, bursting through the Welsh defence at will but Ireland failed to capitalise as O'Gara missed goal again.
The Welsh attack, in contrast, was breathing fire and battered the Irish line. Wales made a ferocious line-out drive to within touching distance but Czekaj was hauled down short; Jones booted the three points after Ireland were forced to concede a penalty to give Wales the lead.
Jones stretched that further with a third penalty seven minutes later for a 9-5 advantage but the game swung back in Ireland's favour after half an hour when Ryan Jones hobbled off to the blood bin and O'Driscoll scored a second for the visitors.
Irish replacement Geordan Murphy recovered his own lofted kick, D'Arcy gave the attack width with his pass and O'Driscoll cut inside Czekaj. The Irish captain stretched out of Morgan's tackle to touch down five minutes before the break. O'Gara's conversion gave Ireland a 12-9 half-time lead.
Czekaj went agonisingly close to redeeming himself just two minutes into the second half. The Blues wing streaked down the touchline, kicking past Andrew Trimble but appeared to be obstructed by Simon Easterby before knocking on over the line. Referee Kelvin Deaker ignored appeals for a penalty try and Wales were left frustrated again as the second-half descended into a heavyweight boxing match - but played at a fantastic pace.
The thrilling encounter swayed back and forth and both coaches turned to their bench with both teams giving everything. Duncan Jones replaced Chris Horsman and hooker Rhys Thomas made way for Matthew Rees but it was O'Gara who settled events nine minutes from time.
D'Arcy darted through to take Ireland to the Welsh line and O'Gara showed tremendous strength to touch down in the corner despite Hook's challenge. Morgan made two half breaks late on as Wales desperately tried to pull something out of the bag, but Ireland stood firm as the Dragons finally ran out of puff following a thunderous game.
RBS Six Nations - Wales 9 - Ireland 19 (HT: 9-12)
Wales: Pens: S Jones (3)
Ireland: Tries: R Best, R O'Gara, B O'Driscoll Cons: R O'Gara (2)
Wales: K Morgan; H Luscombe (A Brew 59), J Robinson, J Hook, C Czekaj; S Jones (capt), D Peel (M Phillips 72); G Jenkins, R Thomas, C Horsman (D Jones 56), I Gough (R Sidoli 70), A Jones, A Popham, M Williams (G Thomas 71), R Jones
Replacements used: D Jones, R Sidoli, G Thomas, M Phillips, A Brew
Ireland: G Dempsey; A Trimble, B O'Driscoll (capt, G Murphy 74), G D'Arcy, D Hickie; R O'Gara, P Stringer; M Horan, R Best (J Flannery 64), J Hayes, D O'Callaghan, P O'Connell, S Easterby, D Wallace, D Leamy
Replacements used: J Flannery, G Murphy
Referee: Kelvin Deaker (New Zealand)