South Africa were 192 for six in their second innings at lunch on Friday, an overall lead of 280. South Africa lost six wickets for 44 runs in 9.2 overs after they had been cruising at 99 for no wicket.
VRV Singh made the first breakthrough, dismissing AB de Villiers for 47, but Sreesanth then took three wickets in eight balls to plunge the home team into trouble.
Sreesanth, man of the match when India won the first Test in Johannesburg, had figures of three for 53 at lunch, taking his haul of wickets to 15 in two matches.
One of Sreesanth's victims was South African captain Graeme Smith, who emerged from a batting slump to make 58.
With South Africa needing a win to square the three-match series, they were well on their way to setting India a challenging target as De Villiers and Smith added 35 to the overnight total of 64 for no wicket.
But De Villiers edged Singh low to VVS Laxman at second slip and the match swung dramatically.
Hashim Amla failed for the second time in the match when he played across the line against Sreesanth and was lbw. Smith, batting with increasing confidence, hit two successive fours off Sreesanth before trying to whip a straight ball through the leg side and having his off stump knocked back.
Smith made his 58 off 81 balls and hit 11 fours.
Ashwell Prince, South Africa's top scorer in the first three innings of the series, followed his century in the first innings with a third-ball duck when he edged Sreesanth to Sourav Ganguly at first slip.
More problems followed for South Africa when leg-spinner Anil Kumble came on to bowl and Herschelle Gibbs patted his second delivery to substitute fielder Dinesh Karthik at short cover.
Sreesanth was rested but left-armer Zaheer Khan, who replaced him, trapped Mark Boucher lbw.
There was yet another twist as Shaun Pollock and Andrew Hall batted sensibly to add an unbeaten 49 for the seventh wicket to tilt the balance back towards South Africa.
South Africa 328 and 192 for 6 (Graeme Smith 58, AB de Villiers 47, Hall 20 n o, Pollock 18 n o; Sreesanth 3 for 53, Kumble 1 for 16, Zaheer 1 for 50) Vs India 240