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.”
Federer surpasses Pete Sampras and William Renshaw, who won their seventh titles in 2000 and 1889 respectively, with only Martina Navratilova still ahead in terms of Wimbledon singles titles on nine.
He has won two of the three Grand Slam titles so far this year, having returned from a six-month break to win the Australian Open in January.
With 19 major titles he extends his lead over Rafael Nadal in the men’s game to four, and now stands joint-fourth on the all-time list with Helen Wills Moody, five behind Margaret Court on 24.