When play was stopped, shortly after the tea break, South Africa were 299 for five in the first innings, trailing India by 35 runs.
Giving Kallis (78 batting) company was nightwatchman Dale Steyn, who was yet to open his account.
Ravindra Jadeja finished the day with 87 for four and was the only Indian bowler, who kept the South African batsmen guessing. Pacer Mohammed Shami (1-62) was also impressive and picked up the wicket of Hashim Amla.
Two quick strikes by Jadeja left South Africa struggling at 131/3 in the morning session, but De Villiers (74) and Kallis, who will retire from Tests after the match, bailed them out from the precarious situation and put them on top with a 127-run stand for the fourth wicket.
Kallis and De Villiers played sensibly as they put the South African innings back on track. De Villiers struck nine fours in his 117-ball stay.
At a time when the partnership looked dangerous, Jadeja struck with a fine delivery that pitched on leg and forced De Villiers to play at it and Virat Kohli took an easy catch at first slip.
Soon after, Kallis also got to his half-century in style, punching Jadeja through the point for a four. Kallis and Jean Paul Duminy (28) kept the scoreboard moving with their 58-run stand for the fifth wicket. It was again left to Jadeja to break the partnership as Duminy was trapped leg before. Duminy must be cursing himself as in next over play was stopped due to rain.
Earlier, Resuming at 82 for no loss, South Africa lost three wickets in the first session at the expense of 99 runs and 86 runs for one in the second.
India started the day with Ishant Sharma and Jadeja. Overnight batsmen Graeme Smith (47) and Alviro Petersen (62) scored runs briskly. But Smith gifted away his wicket while trying a lofty shot off Jadeja. Smith mistimed the shot and Shikhar Dhawan took a great catch running backwards at mid-wicket.
Hashim Amla's poor form with the bat continued as he was bowled by Mohammed Shami with in-swinging delivery for just three runs. It was the third time in the series that Amla was castled.
Kallis, who has played 166 Tests, walked into the stadium amidst a standing ovation from the crowd and also a guard of honour by the Indian team. Kallis will be ending his Test career at the same venue where he made his debut in white against England in 1995.
But soon after his arrival, he could only see a wicket fall at the other end.
Jadeja struck to get rid of Petersen as South Africa lost two quick wickets with the score struck at 131. Jadeja got the ball to turn away after pitching on the middle-stump. But it was bounce that troubled Petersen as the ball kissed the shoulder of the bat before flying to slips where Murali Vijay took a good catch diving forward.
Mumbai food: 9 dishes to try during 9 days of Navratri
Photos: Hrithik Roshan, Nidhhi Agerwal and Adah Sharma walk the ramp
Photos: Shah Rukh Khan spotted with new set of wheels
Photos: Kareena Kapoor Khan, Kangana Ranaut at the Mumbai airport
Chris Gayle's journey from bad boy to a loving partner and caring dad