India went into the test rearranged from last year leading 2-1 and on course for its first series win in England in 15 years. Instead, India conceded its most ever runs in the fourth innings of a loss, and the series was drawn.
England pulled off a fourth straight successful run chase after New Zealand was swept 3-0 last month under the new management of Stokes and coach Brendon McCullum.
Root and Bairstow came together soon after tea on Monday when England lost three wickets in the space of 16 deliveries. The Yorkshiremen commanded India's pace threat of Jasprit Bumrah, Mohammed Shami and Mohammed Siraj by combining in a majestic 269-run stand at more than 5 runs per over.
"Just two lads from Yorkshire, grown up playing together from academy to test matches, it's pretty special," Bairstow said of his association with Root.
They credited the platform they received from the opening century stand between Alex Lees and Zak Crawley.
Root and Bairstow resumed on Tuesday at 259-3, both of them in the 70s.
They negated the reverse swing of the India pacers with some authoritative drives on both sides of the pitch. Root raised his hundred with a boundary to third man off Siraj and Bairstow followed his 106 in the first innings with another hundred after he went for a sharp single.
Bairstow then pounded Siraj for three consecutive boundaries as both batters cantered 34 fours and a six each. Bairstow, dropped twice on Monday, hit 114 from 145 balls. Root was 142 from 173. Both had a staggering strike rate of around 80.
"The feeling in the dressing room is whatever you get, we're going to take it on," Root said. "When you're (batting) at 4.5 an over, it's hard to put the pressure back on you."
Siraj was smacked for 0-98 off his 15 overs while Shardul Thakur went for 0-65 off his 11 overs. Bumrah was the sole wicket-taker in the second innings.
India was on top after achieving a 132-run first innings lead. But England stormed back on the fourth morning when it claimed the last seven India wickets for 170 runs to limit the visitors to an overall lead of 377. The target of 378 — the ninth highest in test history if successful — looked unlikely until England started batting.
"England kept on fighting and played better than us in the second innings," Bumrah said after leading India in the absence of virus-affected Rohit Sharma.