Cook raised his 32nd test ton with a pull-shot to the fence in the final over before stumps, and strode off the ground unbeaten on 104, having pushed England to 192 for two on day two at the Melbourne Cricket Ground.
His successor as captain, Joe Root, was 49 not out, the pair having reduced Australia's lead to 135 runs.
English cheer has been in short supply this series after Australia took back the urn by winning the first three tests but Wednesday's fight back thrilled sun baked Britons in the raucous crowd of 67,882.
Stuart Broad, another Englishman under the microscope after playing a negligible part in the first three tests, captured 4-51 as Australia's day one resistance melted in the morning heat.
The hosts started the day in a position of strength at 244 for three but were bowled out for 327, losing their last seven wickets for 67 runs.
After labouring on a slow and flat pitch on day one, England's bowlers were transformed in the morning, with debutant paceman Tom Curran proving the unlikely catalyst.
The 22-year-old Surrey seamer bowled Steve Smith for 76 with the second ball of his first spell, having the skipper drag a wider, short delivery onto his stumps.
It not only secured Curran his first test wicket but ended Smith's unbeaten reign at the MCG since his last dismissal in the Boxing Day test against India in 2014.
It was also a huge relief for Curran, who had opener David Warner caught on 99 on day one but missed out on the wicket for over-stepping his mark.
Smith was one of three Australian batsmen out chopping onto the stumps, with all-rounder Mitchell Marsh (9) and wicketkeeper Tim Paine (24) falling in the same fashion.
Shaun Marsh dug in to raise his third half-century of the series before being trapped leg before by Broad for 61, the wicket awarded after the bowler demanded a review.
James Anderson bowled Paine for his 520th test wicket, pulling past West Indies great Courtney Walsh to fifth on the all-time list, and grabbed a third victim for the innings by dismissing Nathan Lyon lbw for a duck.
Broad capped off a dominant morning for England by trapping tail-ender Jackson Bird lbw for four and having Pat Cummins caught at slip for four after lunch.
England's rookie top order batsmen Mark Stoneman (15) and James Vince (17) fell cheaply but Cook carried the fight to Australia, riding his luck when Smith dropped him on 66 in the slips.
He and Root combined for a 112-run partnership to give England hope of mowing down Australia's first innings total and taking a substantial lead.
Starting England's response after lunch, Cook and Stoneman fended off Australia's opening pace salvo before Lyon intervened with a brilliant caught and bowled.
The off-spinner coaxed a leading edge from Stoneman and leaped high to pull down a one-handed catch, reviving memories of his acrobatic dismissal of Moeen Ali during the second test at Adelaide Oval.
Vince was given out lbw when paceman Josh Hazlewood sent a full, straight ball thudding into his pads.
He neglected to review the decision and would have regretted it later, with the 'snicko' technology showing he had nicked the ball with his bat.
Root and Cook then frustrated Australia for most of the final session, the hosts' task made heavier with sickly seamer Pat Cummins hampered by a stomach ailment.
alastair cookashesAshes 2017ashes live scoreBoxing Day TestJackson BirdJoe RootJosh HazlewoodMark Stonemanmelbourne testMitchell MarshTim Paine
First Published: December 27, 2017, 1:18 PM IST