The Wallabies enjoyed a largely error-free first 20 minutes, looked assured with the ball in hand and had the better of territory and possession for most of the evening.
They established a 10-3 lead after a Bernard Foley penalty and the game's only try to Scott Sio, who crossed under the posts for his first at Test level to cap off an impressive multi-phase play peppered with smart offloads.
But the Springboks fought back, threatened on numerous occasions and then had the momentum swing back their way thanks to a moment of madness from Israel Folau, who was sin-binned for a collision with veteran winger Bryan Habana six minutes from the break.
With only Folau to beat, the South African vice-captain kicked ahead but was clipped as he tried to move past, prompting referee Wayne Barnes to produce his yellow card. Steyn slotted the resultant penalty and then kicked another on the half-time whistle, after Dean Mumm was caught offside, to put the Springboks ahead 12-10.
From there the match turned into a grind - and the only points scored in the second half were Steyn's 75th-minute penalty that confirmed victory for the Springboks, and a drop goal in the dying moments that sent the crowd of 38.704 wild.
Winger Reece Hodge missed three penalty attempts, with two of them chances to put Australia ahead in the second half.
The other was an audacious early crack from approximately 64m that would have equalled the longest penalty scored in Test history.
It dropped less than a metre under the crossbar.
The Wallabies will lick their wounds and fly to London on Sunday, ahead of their meeting with Argentina at Twickenham next weekend.
-AAP