When Cilic lost the first four games in 12 minutes, it looked like the match might be as one-sided as their Wimbledon final last summer, when struggles with blisters reduced the Croatian to tears.
Largely untroubled all fortnight, Federer is the oldest Australian Open champion in 46 years after defending the title he won so spectacularly in 2017 following six months out of the game.
Cilic upset Rafael Nadal in the quarterfinals on his way to the final.
Argentinian powerhouse Juan Martin del Potro achieved the feat at the 2009 US Open when he crushed Nadal in the semi-finals and edged past Federer to win his first major.
"It could have been the best two weeks of my life, but Roger played a great fifth set", said Cilic, who was chasing his second major title after winning the 2014 US Open.
Federer is the first man to reach 30 Grand Slam finals and the oldest finalist in Melbourne since Ken Rosewall in 1972.
Past year at Wimbledon, he was hobbled by a blister on his foot and couldn't play his normally attacking style of tennis.
The tournament referee made a late call to close the roof and Cilic said it was tough to acclimatize to playing indoors after practicing outdoors earlier in the day when the temperature reached a high of 38 Celsius (100 Fahrenheit). But when you see him lose to unseeded players like Daniel Evans and Fernando Verdasco, his performance leaves fans-who have been saying he's destined to win a grand slam soon-baffled.
A fine serve helped Federer on the second break point but on the first, Cilic put a second-serve forehand return into the net.
Closing the roof may benefit Federer, given he is seven years Cilic's senior.
It's Federer's sixth Australian Open title, tying him with Roy Emerson and Novak Djokovic for most all-time.
All of the recent trends favor a 20th Grand Slam victory for Federer in his 30th final, but he knows defeating Cilic won't be an easy task, per the tournament's Twitter account. I'd been trying for four or five years to win one more, and I would have said, 'One more?
Vintage Federer, with a sharpened attacking nous and a whip for a backhand, stirred up a storm again.
"I definitely think him winning the U.S. Open, like Stan (Wawrinka) winning here a few years ago, it gave them great belief they can do it". If the big moments come about, that he can attain this level, Federer said.
World No.1 Rafael Nadal, six-time champion Novak Djokovic and former victor Stan Wawrinka succumbed to injuries, while five-time finalist Andy Murray didn't even get to the starting line. "I think it surprised me".
Australian Open final will pit Roger Federer against Maric Cilic at Melbourne Park. "I really hurt. I can't walk no more".
He was broken in the next game and Federer - who slammed down 24 aces - registered the insurance break for 5-1.
"I would not have guaranteed my victory against a great player like Federer, even if I was in good physical condition", he said. Fourteen years and 284 days, and the most blazing run in men's tennis history had separated the two at the start of the match.