The Swiss defending champion dropped his only sets of the tournament before completing a 6-2, 6-7 (5), 6-3, 3-6, 6-1 win over the sixth-seeded Croatian in 3 hours and 3 minutes.
He added to his already imposing win-loss record in Melbourne and is now 94-13. His overall his Grand Slam mark stands at 332-52.
The roof was closed over Rod Laver Arena as the tournament’s heat policy was implemented amid evening temperatures of 38 Celsius.
Cilic’s serve came under immediate pressure with a whipping backhand return winner for break point which the Croatian followed with a smash into the net for a break in the opening game.
The Croat was finding it difficult to settle and changed racquets in his second service game, but it had no obvious benefit as he dropped serve again after three break points to trail 0-3.
He finally held serve to get on to the board and trail 4-1 with Federer hitting the ball cleanly.
The Swiss star served out the first set in just 24 minutes after a double break and a shaky Cilic opening.
Federer fought off two break points in his opening service in the second set with pinpoint serves, while Cilic had a tussle before holding in the third game.
Cilic worked his way back into the match as both players traded furious forehands to stay on serve.
Cilic was break point down in the ninth but crucially, got out of it with a second serve ace down the middle followed by a forehand winner.
The Croat had a big moment in the 10th game when two Federer double faults gave him set point but a tentative backhand into the net and a wild backhand cost him his chance.
In the tiebreaker, Cilic got two set points when his forehand clipped the line before a winning smash levelled the match after 84 minutes as Federer dropped his first set of the tournament.
But Cilic lost serve on the back of a couple of ground stroke errors and Federer raced 4-2 up in the third set.
The defending champion shifted gears with a stunning forehand off his toes and confidently held serve to lead 5-2.
Federer closed the door, serving out clinically for the third set in 29 minutes.
Cilic was then broken in the opening game of the fourth set with a poor backhand drop shot into the net as Federer closed in for the kill.
But the Croat broke back in the sixth game with three break points when Federer netted and fought off a break point in the next game to put his nose in front.
Cilic was now more in the flow and broke Federer again with his big forehands starting to find their mark. He served it out to take the absorbing final into a fifth set.
Federer was under pressure to keep his opening service but produced quality backhands to hold on amid mounting tension.
The World No 2 crucially broke to 2-0 when Cilic netted a forehand and held the next service game under pressure to lead 3-0.
Federer got the vital double break when Cilic netted a forehand, leaving the Swiss to serve out for the championship.