Dan Parks missed a late drop-goal as Lucas Gonzalez Amorosino's try gave Argentina a win that leaves Scotland's World Cup hopes on a knife edge.
Felipe Contepomi had kicked Argentina ahead, but penalties from Chris Paterson and Ruaridh Jackson had the Scots ahead at half-time.
Contepomi levelled before drop-goals from Jackson and Dan Parks.
But Amorosino brilliantly weaved over and Contepomi slotted the conversion before Parks' last-ditch attempt.
It leaves Scotland needing to defeat England in their final Pool B game in Auckland to have a chance of avoiding a failure to reach the quarter-finals for the first time.
Scotland spent the first nine minutes in the Argentine half, but Paterson was just wide of the far post with his first attempt at a touchline penalty.
However, they were lucky to escape without falling behind when Martin Rodriguez sliced wide a simple drop-goal attempt in front of the posts during the first spell of Argentine pressure.
Contepomi missed with a penalty attempt from just inside the Scotland half after Nick de Luca failed to release but soon after put Argentina ahead from in front of the posts after the Scots were caught offside after 19 minutes.
Rodriguez was just wide from long range after the Scots conceded another penalty from a collapsed scrum.
A series of Argentine turnovers undermined the Scots as they tried to strike back, but the loss through injury of imposing forward Juan Fernandez Lobbe after 30 minutes appeared to turn the tide.
Scotland were now camped in the Argentine half without threatening the try line, but a penalty conceded by Rodrigo Roncero for pulling down the scrum after 36 minutes allowed Paterson to level the scores from wide on the left.
And, shortly after the restart, Argentina were penalised for not releasing after a tackle on De Luca and Jackson slotted over the penalty from just inside the opposition half.
With Roncero himself having been replaced following injury just before half-time, the forward balance appeared to have swung Scotland's way in the early stages of the second half.
Scrum-half Rory Lawson was held up just short of the Argentine line as Scotland applied the pressure.
With both sides starting to adopt a kicking game in increasingly slippery and breezy conditions, Paterson failed with a drop-goal attempt.
Contepomi hooked a penalty attempt wide of the far post but made up for that after the Scots collapsed a scrum in front of the posts following a 63rd-minute handling error by Paterson.
A minute later, a beautifully controlled drop-goal from Jackson restored the Scots' three-point lead.
Andy Robinson's side conceded another penalty shortly after the restart and were relieved to see Contepomi's effort from 40m strike the outside of a post.
Parks replaced Jackson with 10 minutes remaining and, after a monster kick deep into Argentine territory, slotted over a drop-goal that appeared to put Scotland in the driving seat.
However, Argentina swept up the other end and Amorosino jinked inside Paterson on the touchline and evaded two more tackles before crossing the line for an excellent try that was easily converted by Contepomi.
Parks sliced wide with a drop goal attempt after being forced on to his weaker left foot by an offside-looking Contepomi, but there was to be no whistle other than the final one from English referee Wayne Barnes.
Argentina: Rodriguez, Camacho, Bosch, Contepomi, Agulla, Fernandez, Vergallo, Roncero, Ledesma, Figallo, Carizza, Albacete, Farias Cabello, Leguizamon, Fernandez Lobbe. Replacements: Gonzalez Amorosino for Rodriguez (64), Scelzo for Roncero (36), Creevy for Ledesma (74), Fessia for Fernandez Lobbe (30). Not Used: Galarza, Lalanne, Jose Imhoff.
Scotland: Pens: Paterson, Jackson. Drop Goals: Jackson, Parks. Scotland: Paterson, Evans, De Luca, Morrison, S. Lamont, Jackson, R. Lawson, Jacobsen, Ford, Cross, Gray, Hamilton, Strokosch, Barclay, Brown. Replacements: Dickinson for Jacobsen (61), Hall for Ford (71), Hines for Gray (56), Vernon for Brown (78). Not Used: Parks, Danielli.
Ref: Wayne Barnes (RFU)
- For the latest on the 2011 Rugby World Cup in New Zealand visit our breaking news and gossip page.