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.
The day again belonged to Khawaja, who returned to Test cricket after 2-1/2 years as a makeshift replacement for Travis Head when the middle order batsman tested positive for COVID-19.
The 35-year-old once again oozed class as he re-energised the Australian innings in a 179-run partnership with all-rounder Cameron Green after England had stalled their march towards a second declaration of the match.
Unflappable and stylish, Khawaja added a 101 not out to the 137 he scored in the first innings, punching two runs down the ground to reach the milestone for the 10th time.
"Surreal moment," said Khawaja, who now has three centuries against England at the Sydney Cricket Ground (SCG).
"I've never got back-to-back hundreds in first class cricket, let alone Test cricket.
"It's a nice one to tick off and to put the team in a situation where we can hopefully win a test match tomorrow," he added. "Pretty special."
He was only the third batsman to score centuries in both innings in a test match at the ground, joining compatriots Doug Walters against West Indies in 1969 and Ricky Ponting against South Africa in 2006.
After being dismissed for 294 in the first 40 minutes of the day, England had made a decent fist of bowling at Australia and removed the top four at the cost of only 86 runs.
That only brought Khawaja and Green together, however, and they were closing on giving Australia a 400-run lead when the latter holed out to Jack Leach for 74 to finally break the partnership.
Leach (4-84) then had Alex Carey caught behind off the next ball but Australia Pat Cummins denied the spinner a hat-trick opportunity, declining to pad up and calling Khawaja back to the dressing room with the declaration.
Four of the Australian wickets were taken behind by Ollie Pope, who was keeping wickets in place of the injured Jos Buttler and Jonny Bairstow.
Bairstow, who scored England's only century of the series in the first innings, Buttler and all-rounder Ben Stokes had scans on injuries before play but all will bat on Sunday.
"I'm sure the lads will take whatever they need to take tomorrow," said acting England coach Graham Thorpe.
"They'll all bat and I'm sure they'll all do well."
The weather might yet have something to say about that with storms sweeping down the Pacific coast but if they miss Sydney's Eastern Suburbs, England's task looks imposing.
The highest successful fourth-innings run chase in 140 years of Test cricket at the SCG came when Australia's overhauled a target of 287 against South Africa in 2006.