Root remained unbeaten on 154 while left-handed Anderson (81) scored his maiden Test half-century as England's first innings folded for 496 in the post-lunch session.
India reached 167 for three in their second innings at stumps on the fourth day with a 128-run lead in hand as Shikhar Dhawan (29) and Murali Vijay (52) were guilty of throwing away their wickets on reckless shots after solid starts.
Left-handed Dhawan hit a full toss back to spinner Moeen Ali, minutes before the tea break while Vijay, who looked rock solid, danced down the wicket and the faint edge from his bat flew to the gloves of Matt Prior behind the wickets.
Cheteshwar Pujara (55) was out next ball when he cut a Liam Plunkett delivery straight to the point fielder Ben Stokes, who fumbled but held on to the ball on second attempt.
Virat Kohli (8) and Ajinkya Rahane (18) saw off the remaining overs carefully. With one day remaining in the game, the hosts would look to wrap up the Indian innings to push for a 1-0 lead in five-match series while the visitors would hope that Kohli and Rahane will bat them to safe position.
Earlier, Root and Anderson put on an all-time Test record of 198 runs for the 10th wicket in the first two sessions of the day. Bhuvaneshwar Kumar (5/82) ended India's misery on the field by dismissing number 11 batsman Anderson as the Indian snapped up his first five-wicket haul in Test cricket.
Root and Anderson bettered the previous world record of 163-run stand made by Australia's Phil Hughes and Ashton Agar at this very ground during the Ashes series last year.
The fourth morning began with India desperately looking for the last wicket but they allowed Anderson and Root to build a solid stand by their wayward bowling.
Root and Anderson's partnership also beat a long-standing 111-year old English record for the 10th wicket of 130 runs made by Tip Foster and Wilfred Rhodes against Australia at Sydney in 1903.
It is also first match in 137 years of Test cricket that number 11 batsmen of both the teams have scored fifties.
For India, Mohammed Shami had scored an unbeaten 51. Anderson's is the highest Test score by an England number 11 batsman, beating John Snow's effort of 59 not out against West Indies at The Oval in 1966.