“I’m really proud,” said Australia head coach Joe Schmidt.
“We made a few things hard for ourselves, giving them a big start at home, a big crowd and difficult conditions.
“We put ourselves straight back under pressure by dropping restarts, but we fought, scored tries and created some other chances that would have been great.”
Juan Martinez Gonzalez scored Argentina’s only try early in the first half and penalties from Gloucester’s Santiago Carreras gave the Pumas a healthy lead going into the latter stages.
Jake Gordon and Rob Valetini both crossed for Australia, with Noah Lolesio adding a penalty and two conversions.
It left the game on a knife-edge heading into the final minutes and replacement fly-half Donaldson was presented with a simple penalty kick to give the Wallabies a welcome victory.
Despite the win, Australia – who host the British and Irish Lions next year – remain rooted to the bottom of the standings behind Argentina, New Zealand and runaway leaders South Africa.
Australia, who were thumped twice at home by the Springboks in August, face Argentina in Sante Fe in a rematch on 7 September.