The home team took an unlikely 39-run lead on first innings after Root and Anderson combined for a remarkable stand of 198, beating the previous test best by 35, to lead their side to a total of 496.
England then grabbed two late wickets to reduce India to 167 for three at the close of play.
Murali Vijay (52), who made a century in the first innings, and Cheteshwar Pujara (55) both fell in the last hour to leave the visitors 128 runs ahead.
Part-time spinner Moeen Ali claimed two wickets and paceman Liam Plunkett one. Virat Kohli (eight) and Ajinkya Rahane (18) were the not-out batsmen when stumps were drawn.
Vijay and Pujara put on 91 for the second wicket until the latter cut Plunkett to Ben Stokes at point and the fielder hung on after initially fumbling the catch.
The day, however, belonged to Root and the 31-year-old Anderson, who produced the best score by an England number 11.
England began the day on 352 for nine and the pair had to ride their luck on occasions.
The 23-year-old Root was the backbone of the innings, farming the strike in brilliant fashion as he registered his fourth test century to rescue his team after they had collapsed to 202 for seven on Friday.
Anderson carved out a career-best score until he edged the ball to Dhawan at first slip off Bhuvneshwar Kumar who returned test-best figures of five for 82.
The record partnership meant it was the first time in tests that both sides had compiled last-wicket stands of three figures, following Kumar and Mohammed Shami's alliance of 111 on Thursday.
Australia's Phil Hughes and Ashton Agar shared the previous record for the last-wicket stand when they put on 163 against England, ironically at the same ground last year.
Root struck 15 fours in his 400-minute vigil while Anderson hit 17 fours in his 230-minute knock.
India have not won a test away from home since 2011 while England have lost six of their last seven matches in the longest form of the game.
- Sports & Recreation
- Cheteshwar Pujara
- Murali Vijay
- Liam Plunkett