South Africa took a first innings lead of 166, then put India under pressure as the tourists reached 68 for two at the close, still trailing by 98 runs.
Kallis made 115, his 45th Test century. A sixth wicket partnership of 86 with nightwatchman Dale Steyn (44) was achieved with largely cautious batting but set the foundation for a batting assault by Faf du Plessis and Robin Peterson after lunch as South Africa reached a total of 500.
Du Plessis and Peterson hammered 102 runs in the 14.1 overs of play that was possible between lunch and tea.
Peterson was particularly aggressive, hitting 61 off 52 balls, before he was caught going for a big hit.
"The directive was to try to get 100 runs ahead but Faf and I got away a bit so we decided to try to extend it a little," said Peterson.
Rain brought an early tea but the weather cleared in the late afternoon and South Africa bowled 36 overs before bad light finally stopped play.
Murali Vijay was caught at first slip off Vernon Philander but Cheteshwar Pujara and Shikhar Dhawan dug in before the latter, after batting for two hours and facing 87 balls while scoring 19, fell to a sensational catch when he tried to hit left-arm spinner Peterson over midwicket.
Du Plessis, fielding about 12 metres from the bat, leapt at full stretch to hold a full-blooded shot with his right hand.
"It was a great catch. It's not my wicket, it's Faf's," said Peterson
Kallis is second on the all-time list of Test century-makers behind Sachin Tendulkar, who hit 51 hundreds before retiring at the end of India's series against the West Indies last month.
He moved into third place on the Test run-scorers list on 13,289, one run ahead of India's Rahul Dravid and behind only Tendulkar and Ricky Ponting of Australia.
A prolonged standing ovation greeted his century on the ground where he made his Test debut against England 18 years ago. Among those who applauded him was Indian coach Duncan Fletcher, who was one of his early mentors as coach of the Western Province team when Kallis set out on his first-class career.
There were rare signs of emotion from Kallis after he completed the single off Ravindra Jadeja which took him to his hundred. He was hugged by batting partner Dale Steyn and removed his helmet as he acknowledged the applause, seemingly wiping away a tear.
It was one of his slower centuries, ground out over 334 minutes and 273 balls, but it was a vital innings on a slow, turning pitch on which a first innings lead could prove crucial.
Indian captain Mahendra Singh Dhoni persisted with the tactics he employed on Saturday, declining to take the second new ball and continuing with defensive fields.
"The bounce was more variable with the old ball and we were relying on reverse swing," said Indian fielding coach Trevor Penney.
Left-arm spinner Jadeja bowled unchanged for 21 overs from the start of play. He had figures of six for 138 from 58 overs.
Dhoni finally took the new ball after 146 overs but it could not stop the flow of runs, with 66 runs scored off 8.1 overs before the early tea.
Kallis needed treatment for cramp during a drinks break shortly after reaching his century and his innings ended when he went for a big hit against Jadeja and top-edged the ball into the air to present an easy catch to Dhoni.
The Indian players stood to applaud him back to the dressing room after a 393-minute, 316-ball innings. He hit 13 fours.
Kallis is the first batsman to score a century in his final Test before retirement since Nasser Hussain hit 103 not out for England against New Zealand at Lord's in May 2003 and announced his retirement after the match.
Durban Test: Jacques Kallis hits farewell ton to put South Africa in driver's seat
Advertisement