The middle-order batsman struck the highest individual score of the series and helped India to a position to try and press on for another win.India holds a decisive 2-0 lead in the four-game series being played on spin-friendly tracks.
For South Africa, spinner Dane Piedt took 4-101 to push India on to the back foot early on before Rahane took charge.
"I think the match is fairly even right now," Piedt said. "We started well with the new-ball bowling. The ball has been turning a lot in this series but this wicket does not seem to be breaking like the others. The odd ball is skidding though."
Rahane was fluent from early on for his first half-century on Indian soil and eighth overall, playing some fine drives during his 155-ball innings.
He got past his fifty with a slog-swept six off Piedt over the mid-wicket boundary and a four down square-leg two deliveries later to move in style from 41 to 51.
Rahane was dropped on 78 by Hashim Amla at slip off Piedt with an away-going delivery as the captain juggled with the ball but failed to catch it.
The chance enabled him to get past A.B. de Villiers' 85 in the second test in Bangalore, the highest in the series so far.
Rahane added 59 runs for a seventh-wicket stand with Ravindra Jadeja (24) and India scored 92 runs in the final session as South Africa was left frustrated after dominating a major part of the day.
The other Indian batsmen failed to notch big scores after promising starts, with Virat Kohli playing a fluent knock of 44 including seven boundaries and Shikhar Dhawan contributing 33 off 85 balls in an uncharacteristically slow innings.
For South Africa, Piedt was supported by pace bowler Kyle Abbott (3-23) who was difficult to get away for runs in his 17 overs.
Piedt struck in his fourth over as he removed Murali Vijay in the first session and slowly took charge.
Piedt, playing in only his second test and the first in this series, induced an edge from Vijay to Amla at slip.
He trapped Dhawan leg-before wicket early in the second session and then Abbott bowled Cheteshwar Pujara (14) in the next over as India slipped from 62-1 to 66-3.
Piedt came back to remove a well-set Kohli, who was caught by wicketkeeper Dane Vilas as his swept shot ricocheted off Temba Bavuma at short-leg and ballooned up for Vilas to dive and scoop the catch.
The spinner, who had taken four wickets in each innings of his debut test against Zimbabwe last year, also had Rohit Sharma caught at long-on.
Opener Vijay had earlier been caught at second slip off Abbott when on 10 but was called back when the delivery was declared a no-ball after it was referred to the TV umpire.
India scored only 14 runs off its first 10 overs after electing to bat and the first four came in the 13th over when Dhawan hit Piedt to the midwicket boundary.
India brought in pace bowler Umesh Yadav for legspinner Amit Mishra for this match.
Top-ranked South Africa made three changes, selecting batsman Bavuma, Abbott and Piedt at the expense of Stiaan van Zyl, Kagiso Rabada and Simon Harmer.
South Africa is missing pace bowler Dale Steyn for a third consecutive test due to a groin injury.
3rd test: Pujara hits 130 as India trails Australia by 91
