England suffered an embarrassing 0-4 loss to Australia recently.
In the ascendant for the first time in the five matches when they were 68/0 chasing 271 towards the end of the second session, the touring team lost 10 wickets for 56 runs to slump to a 13th defeat in their last 15 Tests in Australia.
The hosts reached the close of play on 37/3 with a lead of 152 runs after an eventful second day.
England restored some pride having shown the fight captain Joe Root had asked of them.
England, whose hopes of avoiding going 4-0 down in the series would seem to rest on obdurate batting and the weather, will resume on the final day on 30 without loss after Haseeb Hameed and Zak Crawley survived 11 overs before stumps.
Bairstow's gutsy 103 not out helped his side to 258/7 in reply to Australia's 416/8 declared, a position that looked highly unlikely when England limped battered and bruised to lunch on 36/4.
Stuart Broad took 5/101 in England's cause and openers Zak Crawley and Haseeb Hameed, both unbeaten on two, survived five torrid overs before stumps to give the tourists a small morale boost after another day of Australian dominance.
While media speculation has put Stokes in the running to replace Root, the 30-year-old said he is fully behind the current skipper.
Boland is only the second Indigenous Australian male to play a Test after Jason Gillespie, who played his last Test in 2006.
Root has now lost seven of eight Tests he has captained in Australia and also failed to wrest the urn back from their great rivals on home soil in 2019 when the series was drawn 2-2.