Kallis came to the crease with the hosts reeling on 46 for two after being sent into bat and they slumped to 127 for five midway through the afternoon session.
But the experienced all-rounder played a straight bat to everything England threw at him on the way to his 33rd test century, reaching the close on 108 not out with Dale Steyn on 26.
Wicketkeeper Mark Boucher made a fluent 51 and Steyn also shared a crucial partnership with Kallis before bad light ended play early with just over six overs remaining.
“When you’re under pressure, sometimes you need to counter-attack, chance your arm a bit and put the pressure back on them. We could have been 200 all out, but I think it was even-stevens at the end,” Boucher told reporters.
On Kallis, Boucher added: “He mixed defence with aggression really well. I enjoy batting with him because he gets into a bubble and you know it will be safe at his end.”
England seamers James Anderson and Graham Onions removed Ashwell Prince for nought and Hashim Amla (14) in the morning as South Africa limped to 51 for two at lunch.
Captain Graeme Smith, badly dropped by Graeme Swann in the slips on one, fell to Anderson for 30 early in the afternoon session and when Swann struck twice in two balls the touring side, 1-0 up in the series, looked well placed.
AB de Villiers and Kallis had added 76 for the fourth wicket in positive fashion to lead South Africa’s recovery.
De Villiers then gifted his wicket on 36 when he came down the pitch to off-spinner Swann and chipped the ball into Andrew Strauss’s hands at short mid-wicket.
BEAUTIFUL DELIVERY
JP Duminy edged a beautiful delivery that drifted in and turned away to depart for a golden duck. The left-hander was also dismissed first ball in his previous innings in Durban.
The double-strike left South Africa in dire straits on 127 for five but Boucher survived the hat-trick ball.
Kallis stroked the ball sweetly around Newlands for 11 fours off 188 balls, hardly playing a rash stroke in over four hours at the crease.
Boucher shared a stand of 89 for the sixth wicket, batting with typical determination and hitting seven fours in his 31st test half-century before Stuart Broad trapped him lbw.
Steyn was promoted to number eight after making 47 in Durban, scoring freely in an unbeaten partnership of 63 to drag South Africa firmly back into the match.
Scoreboard
England won the toss and elected to bowl first.
South Africa first innings
G. Smith c Prior b Anderson 30
A. Prince c Prior b Anderson 0
H. Amla lbw b Onions 14
J. Kallis not out 108
A. de Villiers c Strauss b Swann 36
J-P. Duminy c Prior b Swann 0
M. Boucher lbw b Broad 51
D. Steyn not out 26
Extras (b-1, lb-11, w-1, nb-1) 14
Total (for six wickets, 83.2 overs) 279
Fall of wickets: 1-1, 2-46, 3-51, 4-127, 5-127, 6-216.
Still to bat: M. Morkel, P. Harris, F. de Wet.
Bowling: Anderson 20-1-62-2 (nb-1, 1w), Onions 18.2-3-60-1, Broad 19-6-54-1, Swann 22-1-74-2, Pietersen 4-0-17-0.
England – A.Strauss, A.Cook, J.Trott, K.Pietersen, P.Collingwood, I.Bell, M.Prior, S.Broad, G.Swann, J.Anderson, G.Onions.