The Blitzboks - starved of possession against the physical Argentina side - had a lot of defending to do in the first half, making 14 tackles to two, and did well to keep the South Americans at bay for the opening five minutes, bar an early Matías Osadczuk try three minutes in.
A good turn-over in their own half, followed by a strong JC Pretorius run brought the Blitzboks right back into the game just before the break.
Los Pumas were handed a yellow card for playing the ball on the ground in a try-scoring position and from the resulting penalty, Impi Visser scored when the ball was moved to the unmarked player. The conversion went wide, giving Argentina a 7-5 lead at the break.
The second half started well for the Blitzboks when a beautiful break by Selvyn Davids released Siviwe Soyizwapi on the outside and the wing raced all of 50m to score. Dewald Human converted, giving South Africa a 12-7 lead.
The final five minutes were pretty even, but when Visser was carded for a failed interception, Los Pumas struck. Augustin Moyano scored and when the conversion struck the upright it was all to play for with less than a minute to go at 12-12.
The Pumas regained the restart and again used their extra number to breach the Blitzboks' line, with Tomas Lizazu getting the winning score.
South Africa 12 (5) - Tries: Impi Visser, Siviwe Soyizwapi. Conversion: Dewald Human.
Argentina 19 (7) - Tries: Matías Osadczuk, Augustin Moyano, Tomas Lizazu. Conversions: Joaquin Pellandini, Tobias Wade.
Earlier on Sunday, the Blitzboks suffered an agonizing 12-7 defeat to Fiji in the quarter-finals, coming desperately close in topping the defending champions at Hong Kong Stadium.
Fiji held a 12-0 lead at the break, but the second half proved much better for South Africa, who scored the only try of the second stanza and looked set to get another in injury time before being ruled to have played the ball on the ground.
The first six minutes of the match were tight, with good defence from both teams. The Fijians had a slight upper hand on the ground, turning over South African possession three times, but with scant reward.
Their first try, scored by Joseva Talacolo, was a gift from the Blitzboks, who threw an errant pass on attack. Fiji kicked ahead and Talacolo scored.
From the restart, Fiji regained possession and started another attack which saw Jeremaia Matana dotting down under the poles, with Iowane Teba converting for a 12-0 lead at the break.
The second half saw a change in momentum as the Blitzboks took the game to Fiji. They had a number of strong runs, one such handing Siviwe Soyizwapi a try which was converted by Selvyn Davids.
This score cut the lead to five with three minutes to play. South Africa pressed hard and in the final play of the game looked dangerous on attack, but was pinged at the breakdown and Fiji survived to score a seventh straight win over their opponents at this venue.
South Africa 7 (0) - Try: Siviwe Soyizwapi. Conversion: Selvyn Davids.
Fiji 12 (12) - Tries: Joseva Talacolo, Jeremaia Matana. Conversion: Iowane Teba.