Contepomi kicked three early points and Lansdowne Road then fell into silence as the Pumas' lead was extended in the fifth minute thanks some excellent work from the fly-half's brother, Manuel.
The Newman centre came up with the ball at the breakdown and, with only O'Driscoll in front of him he drew the British Lions star and fed Federico Martin Aramburu who galloped home.
O'Gara slashed the deficit with a drop-goal but Argentina wasted little time in restoring their 10-point cushion with another Felipe Contepomi penalty before O'Gara sent over a penalty of his own.
The Pumas were not done yet though, rumbling forward with purpose and forcing Ireland to infringe out wide which gave Contepomi the opportunity to land another penalty on the stroke of half-time.
The Irish continued to hammer away at Argentina's right touchline with some success after the break, forcing the frustrated South Americans to concede another penalty which O'Gara stroked between the uprights.
But each time Eddie O'Sullivan's men appeared to have clawed their way back into the match Contepomi would pounce, slotting a fourth penalty in the 49th minute to send his side 10 points clear.
Ireland were winning ball but Argentina's defence gave nothing away and a third O'Gara penalty was all the home team had to show from another foray into the opposition half.
O'Gara was on target with a 67th-minute three-pointer before Pumas number eight Gonzalo Longo was sent to the sin-bin for giving away too many penalties in the 72nd minute.
That left Argentina effectively down to 14 men for the rest of the match and O'Gara rubbed salt into the visitors' wounds by kicking the ensuing penalty.
With a packed Lansdowne Road roaring them on, Ireland surged forward in injury-time, setting the platform for O'Gara to fire the drop-goal which sealed a dramatic victory.
Ireland: G Dempsey; G Murphy, B O'Driscoll (capt), S Horgan, D Hickie; R O'Gara, P Stringer; R Corrigan, S Byrne, J Hayes, M O'Kelly, P O'Connell, S Easterby, J O'Connor, A Foley.
Replacements: F Sheahan, M Horan, D O'Callaghan, E Miller, G Easterby, D Humphreys, K Maggs.
Argentina: JM HernÃ0Â¡ndez; L Borges, FM Aramburu, M Contepomi, H Senillosa; F Contepomi, A Pichot (capt); R Roncero, M Ledesma, O Hasan, R Alvarez, P Albacete, M Durand, L Ostiglia, G Longo.
Replacements: F Mendez, E GuiÃ0Â±azu, P Bouza, A Petrilli, NF Miranda, JF Miranda, GP Tiesi.