The Blitzboks started badly as the Australians rocked them with two quick tries.
Henry Hutchinson scored from the kick-off before Joe Pincus bagged a second.
Down 12-0, the Blitzboks managed to keep their hands on the ball for a while and Siviwe Soyizwapi was worked over in the corner.
From the restart, good pressure by South Africa forced the Aussies to spill the ball and Justin Geduld scored to level the scores.
The Aussies had the last say in the half though, with Matthew Wood going over in the corner to lead 19-12 at the break.
The second half started pretty much like the first, with two tries by Australia in short succession handing them a handy 29-12 lead.
Fighting the clock as well as a very physical defence, the Blitzboks came back with a try by Muller du Plessis.
JC Pretorius, who earlier lost the ball over the line, scored in the final play, but with time up on the clock, there was no miracle comeback for South Africa.
They will now play New Zealand in the semi-finals for the 5th place final later on Sunday.
Scorers:
South Africa - Tries: Siviwe Soyizwapi, Justin Geduld, Muller du Plessis, JC Pretorius. Conversion: Branco du Preez.
Australia - Tries: Henry Hutchinson (2), Joe Pincus, Matthew Wood, Ben O'Donnell. Conversions: Lewis Holland, Josh Coward.