JP Duminy later chipped in with two wickets (2/70) of his own, as he accounted for both Virat Kohli (96) and Ajinkya Rhana (15).
MS Dhoni (16) was unbeaten at the fall of Rahane's wicket which brought the interval.
In the absence of Morne Morkel due to injury, Kallis (3/68) stepped up to give South Africa hope on the penultimate day of the match as India's lead steadily increased towards 400.
Vernon Philander was at his miserly best, bowling four maidens in a five-over spell which cost just two runs but yielded no wickets.
Kallis removed the top scorer of the match Cheteshwar Pujara (153) just as another session seemed to be getting away from the Proteas.
He later ended the innings of new batsman Rohit Sharma for six as South Africa fought their way back.
Pujara brought up his 150 off 247 balls in the 87th over as the new ball for South Africa did not provide the breakthrough.
After reaching his milestone, Pujara attempted a cut off a Kallis delivery and edged through to AB de Villiers for a well-played 153.
The wicket brought an end to the third wicket 222-run partnership between Pujara and Kohli.
Kallis struck again to remove new batsman Sharma for six as India were left on 325/4. The Proteas all-rounder produced a brute of a delivery, as the ball kept low and jagged back from well-outside off to clatter into the stumps.
Kohli was next to depart for 96 as India fell to 327/5 as he played a cut-shot at a Duminy delivery, but De Villiers gathered the faint edge to send the batsman to the changeroom.
He just missed out on becoming the first Indian number four batsman to score centuries in each innings of a Test match.
With
the score on 358, Duminy struck again as he had Rahane caught at first
slip by Graeme Smith with the second ball of his over.