He suffered a painful blow to the thumb from a Pat Cummins delivery but soldiered on to bring up his seventh test century a few minutes before stumps when he slapped a delivery from the Australia captain to the boundary for a four.
Stokes enjoyed a major stroke of luck on 16 when a Cameron Green delivery thumped into his stump but failed to shift the bail and he survived after a DRS review to bring up his 25th half century just before tea.
He hit nine fours and a single six in his 91-ball knock before walking when he was trapped lbw by off-spinner Nathan Lyon.
Cummins then got his first wicket of the match to dismiss Jos Buttler for a duck and his second after a DRS review detected a touch of Mark Wood’s bat on the ball before it was caught by Lyon. Wood slugged three sixes in his 39.
Bairstow will resume on day four with Jack Leach, who was four not out, looking to cut deeper into Australia’s lead.
It was quite a recovery after a breathless first session that was delayed for two hours by drizzle but burst into life in a fiery storm of pacebowling from the Australian attack.
England lost openers Haseeb Hameed and Zak Crawley, skipper Joe Root and Dawid Malan cheaply before lunch, the last three without a single run being added to their tally of 36.
Mitchell Starc removed Hameed for six to start the collapse but the most damage was done when Scott Boland picked up where he left off in the third test in Melbourne.
Boland took six for seven on debut as England were skittled for 68 in their second innings at the Melbourne Cricket Ground, giving Australia an innings and 14-run victory for an unassailable 3-0 lead in the five-match series.
Retained because of an injury to Josh Hazlewood, Boland struck with the final ball of his second over to remove the top of Crawley’s off stump and send the batsman back for 18.
The 32-year-old returned to remove Root when the England captain, who had yet to score, lashed out at a wider delivery and Steve Smith took the catch at second slip.
England were trying to be cautious but 53 balls without scoring only increased the pressure on them and Green brought up lunch when he had Dawid Malan caught off the glove in the slips for three.
Boland finished the opening session with figures of 2-0 from four maiden overs.