South Africa, who made 450, had the hosts Australia under pressure at 111 for three in reply at stumps
South Africa were on track to end Australia's unbeaten 24-year Test run at the Gabba after dominating the third day's play in the opening Test on Sunday.
The world's number one team amassed a formidable 450 in their first innings and then had Michael Clarke's Australians under pressure at 111 for three at stumps.
Clarke was at the crease on 34 with opener Ed Cowan not out 49 in an unbroken 71-run stand.
The Australians last lost at the Gabba against the West Indies in 1988, but the Proteas' first innings total was the best by a touring side at the ground since England's winning 456 in 1986.
Jacques Kallis had a memorable day, making his 44th Test century -- he is second on the list of all-time century makers, behind only India's Sachin Tendulkar -- and his fifth against Australia.
His 147 was the highest score by a South African in a Brisbane Test since Eddie Barlow's 114 in 1963.
The star all-rounder also chipped in with two catches at second slip to help put the skids under the Australians.
"I think tomorrow morning's a key part of the game for us. If we can nip out a couple and put some real pressure on Australia, who knows?" Kallis said.
"I think we've just got to give ourselves the opportunity. I think the game's far from dead.
"There's enough in the wicket as well. As long as we keep applying the pressure, that's all that we can do. If Oz play well, then fair enough."
The home side's thoughts turned to saving the match after three wickets tumbled inside the opening 10 overs.
David Warner lasted 15 balls before Dale Steyn slanted a delivery across him. He poked it straight to Kallis at second slip to depart for four.
Debutant Rob Quiney fell to a spectacular juggling catch on the fine leg boundary rope by Steyn for nine off Morne Morkel.
Steyn tossed the ball into the air, realising he was going over the rope. He had the presence of mind to step back into the field of play and take the catch.
Senior batsman Ricky Ponting lasted just five balls before he edged Morkel to the safe hands of Kallis for a duck to leave the home side wobbling at 40 for three.
Kallis and Hashim Amla earlier hit centuries as South Africa dominated Australia's bowling with a formidable first innings of 450 off 151.4 overs.
Australia removed Kallis shortly after lunch when Quiney took a high two-handed chance in the gully off James Pattinson to end the allrounder's 349-minute stint at the crease.
Kallis shared in a 165-run partnership for third wicket with Amla, who reached his third century in four innings against Australia and his 17th overall before he given out lbw to Peter Siddle for 104.
Amla was struck high and TV replays suggested the ball was going over the stumps. Surprisingly, he did not refer Asad Rauf's decision to the third umpire.
The world number two batsman in Tests became South Africa's first triple centurion with an unbeaten 311 against England at The Oval in July.
The Australian bowlers, who took just two wickets on Friday's opening day, had their best spell with four wickets in the middle session.
Ben Hilfenhaus wrapped up the Proteas' innings with the wickets of Dale Steyn (15) and Morne Morkel (0) after tea. JP Duminy was unable to bat after rupturing his Achilles tendon on Friday's opening day.
Debutant Rory Kleinveldt blasted two successive sixes off spinner Nathan Lyon to remain 17 not out.
Pattinson was Australia's best bowler with three for 93.
Australia, in the field for over 10 hours interspersed by Friday's washout, were in trouble early on when South Africa's vaunted pace attack pressed home the advantage to groans from the home crowd.
The first target is to avoid the follow-on by reaching 251 on Monday's fourth day.
"The partnership we have at the moment is the crucial one for us," Hilfenhaus said. "Hopefully, they can continue that tomorrow and make our way closer to their total."