At the break, Elgar was batting on 76 not out, while du Plessis was unbeaten on 48 runs. The Proteas trail by another 349 runs.
India made the early breakthrough after India resumed at 39-3, with Ishant Sharma (1-29) trapping Temba Bavuma (18) lbw in the seventh over.
But momentum changed as Elgar and du Plessis combined, batting positively against spinners and looking to score rather than just survive.
They rotated strike often and then picked up regular boundaries, not allowing the spinners to settle down. In doing so, they put on 53 runs off 83 balls with South Africa crossing 100 in the 38th over.
Elgar hit six fours and three sixes, while du Plessis hit seven fours and a six as the pair frustrated India’s bowlers.
India declared its first innings at 502-7, established on an opening stand of 317 runs between Mayank Agarwal (215) and Rohit Sharma (176).