Aiden Markram (94) and Hashim Amla (82) threatened India with signs of a prospective big total. But India's bowling unit, spearheaded by off-spinner Ravichandran Ashwin (3/90), took four wickets in the final session to show the team's intent of making a strong comeback after the defeat in the opening Test in Cape Town.
Captain Faf du Plessis (24 batting) and Keshav Maharaj (10 batting) were at the crease at the end of the day's play.
Du Plessis earlier in the morning won the toss and elected to bat on a bouncy wicket with less seam and swing as compared to the Newlands wicket in the first Test.
Opening batsmen Markram and Dean Elgar (31) justified the skipper's decision with sensible batting. They stitched together a 85-run partnership to give a good start to the hosts.
Indian pacers Jasprit Bumrah, Ishant Sharma and Harik Pandya operated with probing line and length.
Ishant replaced Bhuvneshwar Kumar for this match, while injured glovesman Wriddhiman Saha made way for Parthiv Patel. Another change was Lokesh Rahul replacing Shikhar Dhawan.
Mohammed Shami disappointed by bowling fully-pitched deliveries though Pandya rose up to the challenge got more overs to bowl than the former.
The 23-year-old right-hander Markram was particularly impressive, registering his second Test fifty which had 14 fours.
When South Africa were 61/0, India sought a review after the umpire turned down a caught behind appeal against Elgar off off-spinner Ravichandran Ashwin. But the umpire's decision remained with the snickometer giving no sign of the ball kissing the bat.
Markram was the aggressor, while Elgar batted with steely resolve and backed his defensive techniques to the hilt as the hosts reached 78/0 till the lunch session.
Elgar fell three overs into the second session. The experienced left-hander stepped out of the crease but his uppish drive to a rising delivery from Ashwin went to close-in fielder Murali Vijay.
But an unflustered Markram joined hands with Amla and the pair continued to control the Indian bowlers. Markram even though fell six runs short of his third career century in five game, gave a good accout of his talent. He was in a punishing mood but with a sensible approach.
He dealt with disdain whenever the Indian pace bowlers erred in line and length and was also good against Ashwin.
Ashwin moved round the wicket to force a faint edge of the 23-year-old's bat for an easy catch for Parthiv, bringing an end to a 67-run stand.
Gujarat wicket-keeper Parthiv later, however, dropped a half chance on Amla when he was batting on 30. Amla went after Ishant's wide delivery on the leg stump but coulnd't connect it properly. A fully stretched Parthiv dived to the left but the ball evaded his left hand.
The dropped catch proved costly as the veteran right-hander went on to add another 52 runs.
The third session was fruitful for the Indians as they claimed the key wickets of Amla, AB de Villiers (20). De Villiers chopped a delivery from paceman Ishant on to his stumps, with the hosts at 199/3.
Amla was settling in nicely for a big knock, playing a crafty knock until a direct throw from Pandya led to his dismissal as South Africa lost their fourth wicket for 246 runs. Amla controlled a short delivery from Pandya to the short leg before running for a single. Pandya collected the ball and threw directly at the non-striker's end to catch Amla short of the crease. It was quite a big wicket considering Amla is known for playing big knocks and to see him back rejuvenated the Indians.
In the very next over, Quinton de Kock (0) was caught at slip by Virat Kohli off Ashwin.
Trusted lower-order batsman Vernon Philander ran himself out due to a mix-up with du Plessis. After playing a Pandya delivery towards the short midwicket, Philander ran towards the other end without a confirmed approval from du Plessis. Pandya collected the ball and threw at wicket-keeper Parthiv, who did the rest to dismiss Philander.
Afterwards, du Plessis and Maharaj held the fort as South Africa reached 269/6.