The Swiss third seed won 6-3 6-1 6-4 as seventh seed Cilic struggled with a blister on his left foot and broke down in tears during the second set.
Federer, 35, finished the contest in one hour and 41 minutes to claim his first Wimbledon title since 2012.
He becomes the oldest man in the Open era to win at the All England Club.
"It is cruel sometimes," Federer said of Cilic's physical difficulties.
"But Marin fought well and is a hero, so congratulations on a wonderful tournament."