David Warner hit a dashing 145, his second century of the match, before Australian captain Michael Clarke declared at 303 for five to set the hosts the huge target.
There were a potential 144 overs remaining in the match, leaving South Africa needing to fight an extended rearguard action in order to avoid defeat in South African captain Smith's last Test.
Smith was given a guard of honour by the Australian players but soon lost Alviro Petersen, his opening partner, who was leg before wicket to Ryan Harris - the 100th Test wicket for the fast bowler.
The Australians stood to salute Smith as he left the ground and his teammates gathered on the pavilion steps to applaud him off. Smith kissed the badge on his helmet and waved to the crowd before disappearing into the dressing room.
Also Read
Dean Elgar was bowled by Johnson with what proved to be the last ball before tea.
Smith announced on Monday night that he was retiring from international cricket after the current match. His last stint as captain in the field was an ignominious one as at times he had nine fielders on the boundary in a futile effort to stop the flow of runs.
When Warner was on 79 he reached 1000 runs in eight matches during the southern hemisphere season.