Bavuma went to tea on day three unbeaten on 125, after a session where Australia's only highlight was Scott Boland claiming his third Test five-wicket haul.
With almost five sessions lost to rain across the opening five days, either team will need something special to win this Test.
But until Bavuma's heroics on Tuesday, Australia looked like they had a clear path to victory at St George's Park and an unassailable 2-0 series lead.
The diminutive right-hander came to the wicket at 2-20 on the opening day just before rain stopped play, and helped rescue the Proteas from 4-40 and 6-110.
He did so with the help of the hard-swinging Marco Jansen, with the pair putting on 132 for the seventh wicket and the Proteas quick hitting 85 himself.
In a partnership between two of Test cricket's tallest and shortest men - with a 44 centimetre gap between them - the difference in approaches looked just as stark.
Bavuma left well and was the Proteas' composed man, after admitting his own decision making was poor in last week's 214-run loss to Australia in Durban.
After getting through difficult periods on the wet opening two days, Bavuma produced some beautiful on-drives off Boland (5-63) and Pat Cummins on Tuesday.
Another crunching cut shot in front of point came off Josh Hazlewood as he approached three figures, before bringing it up pulling Cummins for four.Â
He offered one tough chance late when Steve Smith couldn't grasp a low ball at slips off Hazlewood, briefly forcing Australia's vice-captain off for treatment on his finger
Bavuma has scored five Test centuries, with four of them as captain. But this one may be his finest given the circumstances.
At the other end, Jansen provided the fireworks.
The 206cm giant edged his first ball for four off Mitchell Starc and was 13 by the end of that same over as he went from nicking through slips to driving through cover.
He drove Scott Boland for a massive six over mid-off, hit another down the ground off Renshaw that crashed into the commentary boxes and pulled Cummins for a third over square leg.
And while he threw away a maiden century when he chipped Boland to midwicket in the first over with the new ball, Simon Harmer (30no) helped Bavuma carry on with an unbeaten 76-run seventh-wicket stand.
South Arica's resurgence came with Hazlewood unable to bowl in the first session after being ill yesterday, and Matt Renshaw and Nic Maddinson bowling eight overs of spin with Nathan Lyon out of the side.
The door looked open for Australia early when Starc (2-87) had Wiaan Mulder caught in the slips with a brute of a ball that bounced and took the right-hander's glove and helmet on the way through.
It made Starc the 10th man to claim 450 Test wickets, after Boland had ripped through South Africa across the 43 overs available on the opening two days.