A charged-up Bairstow smashed a rapid 106, his third hundred in four innings, providing the bedrock for England's 284 all out in reply to India's 416.
The tourists reached 125-3 at stumps in their second innings with the dour Cheteshwar Pujara (50) and the daredevil Rishabh Pant (30) in the middle.
Earlier, an on-field altercation with India's Virat Kohli appeared to fire up Bairstow who played some breathtaking shots to rescue England.
Ben Stokes was dropped twice in the morning session but the England captain could not capitalise on the reprieves and departed for 25.
Stokes, on 18, came dancing down the track to Mohammed Shami and offered a skier which Shardul Thakur floored at cover.
Thakur suffered Shami's agony when Jasprit Bumrah dropped a sitter at mid-off to give Stokes another let-off.
Bumrah immediately redeemed himself, however, by taking a stunning diving catch when Stokes repeated the cavalier shot to Thakur's next delivery.
Bairstow refused to retreat into his shell and continued to attack the bowlers as he did in the home series against New Zealand last month.
His superb touch was best illustrated when he pulled Mohammed Siraj from outside the off-stump for the first of his two sixes.
Bairstow was adjudged lbw to Thakur on 81 but the decision was overturned after replays confirmed an edge before the ball hit his pad.
The right-hander brought up his century with a boundary off Thakur and broke into an animated celebration - jumping in joy with his helmet off and his arms aloft.
A bowling change finally did the trick for India and Shami dismissed Bairstow who slashed hard at a wide delivery and Kohli took a sharp catch at first slip.
Sam Billings made 36 down the order but England still fell short of the 300-mark and conceded a lead of 132.
Siraj claimed 4-66 for India while Bumrah returned figures of 3-68.
James Anderson removed Shubman Gill in the first over and Stuart Broad got rid of Hanuma Vihari but Pujara dug in his heels to frustrate England when India came out to bat.
Kohli (20) unfurled some silken drives before being done in by the extra bounce generated by Stokes.
Billings had spilled the catch but an alert Joe Root grabbed the ball before it could hit the ground.
Pant, whose rapid 146 put India in the box seat, was more restrained in the second innings.
India are 2-1 up in the series which could not be completed last year following COVID-19 cases in the India camp ahead of the final match at Old Trafford.