Steyn returned figures of 4/55 at the end of the game to level the three match series at 1-1.
Australia were bowled out for 216, as only the opening batsmen Chris Rogers (107, 237 balls, 12 fours) and David Warner (66 runs, 73 balls, nine fours) managed double figures.
The visitors witnessed a batting collapse after they had reached 126 for no wicket, before they lost 10 wickets for 90 runs.
Set a mammoth 448 to win, Australia had been coasting in the final session but the Proteas were able to claim nine wickets.
Morne Morkel made the initial breakthrough after tea.
Alex Doolan (5) edged Morkel through to Graeme Smith at slip.
Shaun Marsh was then out for a first ball duck lbw to Vernon Philander, as Australia were reduced to 153 for three. It completed a pair for Marsh, after scoring a century in the first Test in Centurion.
It was then the turn of Dale Steyn to strike twice with consecutive deliveries. First out was Aussie captain Michael Clarke (1) as he edged Steyn through to Faf du Plessis, who took a diving catch at second slip.
Next was Steve Smith, out for a first ball duck as he missed an inswinging ball, and was out lbw as Australia fell to 156 for five.
The Australians lost their sixth wicket with the score on 166. Brad Haddin departed for one, as Steyn got the ball to jag back in, and take out the middle stump.
Philander accounted for Mitchell Johnson (6) trapped in front, as Australia fell to 197 for seven.
Australia were seven wickets down at the scheduled close of play at 6pm, but the umpires granted South Africa the extra half-an-hour in search of a result.
Steyn, in his next spell, picked up his fourth wicket as he had Ryan Harris lbw for six, which left South Africa needing two more wickets for the win.
Rogers was out run with four minutes remaining in the day, following a direct hit from substitute fielder Alviro Petersen.
Dean Elgar took the last wicket as Nathan Lyon was out for a duck.
Before tea, Aussie opener David Warner was out for 66 (73 balls, nine fours, one six) lbw to JP Duminy.
South Africa had declared in the morning session as they moved to 270 for five in their second innings. Hashim Amla top scored with 127 not out (176 balls, 16 fours), as the hosts scored at over four an over in their second innings.