The fourth and final test of the series will be held in Australia.
Khawaja 137, Smith 67, Starc 34 and Broad 5-101
Bairstow scored 103 and Wood 39 as England 258-7.
England is behind by 158 runs.
The scorecard is a summary of what happened.
Bairstow scored a century as England's batters finally showed some fight against Australia on the third day of the fourth Test.
Bairstow's 103 and his 128-run stand with Ben Stokes helped England recover after they fell to 36-4.
Mark Wood and Bairstow put on a 72-run stand, with Mark Wood hitting an entertaining 39 from 41 balls.
England closed on 258-7, trailing by 158.
England made a poor start when play resumed after being delayed by two hours due to persistent rain.
Bairstow and Stokes came to the fore as they lost three runs in 53 balls.
The two were able to dominate Australia's bowlers in a way that England have failed to do.
Australia dropped three catches and have an injury concern over Boland, who was taken for a Scan after falling in his follow-through.
The fight that England showed will have encouraged the dressing room.
The third day's play was analyzed.
Bairstow and Stokes are fighting hard.
Bairstow had a serious thumb injury and was unable to bowl on day two, so it looked as though he would have to end the game early.
Both players are determined to make a mistake. Bairstow is a batter who thrives on the chance to prove people wrong, while Stuart Broad said that Ben Stokes is the toughest cricketer he has seen.
After being dropped by Pat Cummins in his follow-through on nine, he survived a Cameron Green delivery hitting the stumps but not dislodging the bails on 16.
After being hit on the hand by Green, Stokes hit three fours in a row off Mitchell Starc to bring up the 50 partnership.
Bairstow cut loose when the two were batting sensibly towards tea after the fall of Stokes.
He continued to pull and drive as Australia's quicks tried to target his injured thumb, even after he hit two sixes.
Bairstow kept his hand off the bat but was able to soldier on, despite the concern of captain Joe Root who sat on the side of the pitch to watch.
He was overshadowed by Wood, who swung Cummins for three sixes in his entertaining knock, and had to wait until the final over of the day to reach three figures.
He received a standing ovation from the dressing room as he swung Cummins for four to register England's first century of the tour.
Australia and England show frailties.
There is a sense of inevitability when England bats, as if a collapse is just around the corner and a bad shot is only one ball away.
This is a tired batting line-up, summed up by the fact that England's first Test duck of the 21st century was given to Joe Root. They were unable to mount any resistance on a difficult pitch.
Haseeb Hameed, whose place for the fifth Test must be under serious question, was bowling an extravagant drive and was caught and bowled.
After a brief fight,Crawley was caught by a Boland nip-backer,Root slashed the same bowler to slip, and Dawid Malan looked at the bowler who dropped him as England crumbled before lunch.
Australia was far from their best with the ball and struggled for ideas as Bairstow, Stokes and Wood attacked.
Lyon went for 71 from his 10 overs, while Starc went for only 2 from his 10 overs.
Cummins was hit for three sixes by Wood as England attacked in the evening, but neither Hameed nor Crawley could make it count.
It is the first time Australia have been tested and they looked short of ideas.
They said it would take a lot to remove me.
Bairstow spoke to Test Match Special and said that he was relieved and overjoyed. We need to build on it tomorrow as well.
You're going to take blows, but my thumb is sore. It will take a lot to remove me from things. I might get an x-ray on it, but I think I'll be there in the morning.
Steve Smith said that Australia is in a good position despite the weather uncertainty. It was a good counter-attack from Bairstow.
The pitch is playing with the new ball. The ball is not playing as many tricks when it gets soft.
It looked dire at lunch, but it's been a lot of entertainment, it's better than it might have been.
We've seen Bairstow bat with bravery and skill. You can't escape the fact that all of them failed.