A dominant 6-3 6-1 6-4 defeat of an emotional and injured Marin Cilic on Centre Court of the All England Club in London handed the Swiss a record eighth Wimbledon singles title, and his 19th major overall.
"It's disbelief that I can achieve such heights," Federer said, after winning the match with 23 winners in an hour and 41 minutes and breaking the serve of the one of the game's biggest servers five times.
"I wasn't sure if I was ever going to be here again in another final after last year," said Federer, who won his first Wimbledon title in five years without losing a single set.
"I've had some tough ones here, losing to Novak in 2014 and 2015. But I always believed that maybe I could come back and do it again. And if you believe, you can go really far in your life.
"I know I did that and I really kept on believing and dreaming and here I am today with the eighth, it's just fantastic," said the Swiss, who wept when he spotted his two sets of twins in his box with his wife Mirka and parents after the match was over.
Before this year's Wimbledon, Federer had been tied at a men's record seven Wimbledon championships alongside Pete Sampras and William Renshaw (who won his last one in 1889).
Martina Navratilova holds the all-time Wimbledon record with nine championships, while Rafael Nadal became the only man to clinch the same major ten times at last month's French Open. Australia's Margaret Court remains the most successful tennis player of all time with 24 major singles titles.
Playing in his 11th Wimbledon final and his 29th slam final overall, the experienced Federer had the upper hand from the start against the big-hitting former US Open champion from Croatia, who looked to be overwhelmed by the occasion of playing in his first major final on the grass and cried after trailing by a set and break as he seemed to struggle physically.
After losing the second set, Cilic had treatment on his left foot. Although he regained his composure in the third set, he was never able to trouble Federer as he continued to struggle with his movement.
Still, he never thought about retiring, the Croat said at the trophy ceremony.
"I never gave up when I start a match," Cilic said. "That was my idea also today, I gave my best. That's all I can do."
He later revealed that he had sustained his injury during his four-set semifinal against big-serving American, Sam Querrey.
"It was a really bad blister," Cilic told reporters
"The last 30 hours, the physio was constantly with me but I still felt the pain."
Federer was full of praise for his opponent: "It is cruel sometimes, but he fought well and is a hero."
Six months off
At 35 years, 342 days, Federer is the oldest man to win the Wimbledon title since tennis turned professional in 1968. Before today, he last won the Wimbledon title in 2012, when he reduced Britain's Andy Murray to tears.
His second major triumph of the year capped a remarkable turnaround for the Swiss superstar, who looked down and out after losing to eventual finalist Milos Raonic of Canada in the semifinals last year.
A few weeks after that defeat, Federer shocked his many millions of fans around the world when he announced he would take the rest of the season off to let his bad back and surgically repaired knee heal.
Refreshed after the longest break of his career, Federer pulled off one of the greatest sporting comebacks of all time in January, when he took his 18th major at the Australian Open by beating his long-time nemesis, Spain's Nadal.
"I've got to take more time off, I don't know what's going on, I'll be gone again from the next six months, I'm not sure it's going to work out this fantastic every time I come back," Federer joked.
"But better than holding the trophy and winning today I guess is just being healthy," he said. "We worked so hard last year. To be back here, feeling great and holding the trophy now, the tournament that I've played, not dropping a set, it's just magical. Really I can't believe it yet. It's too much, really."
On a muggy day at the All England Club, a nervous Cilic dumped a backhand into the net on his first break point in the fourth game, after which Federer took six straight points to set up three break opportunities of his own.
After Cilic gifted him the break on a backhand that hit the bottom of the net, Federer twice held to love to take a 5-3 lead as he started to move around the court freely, mixing up the pace with disguised drop shots.
Serving to stay in the set, Cilic saved a set point with a big serve, but on the second set point, he produced a double fault to hand Federer the first set, 6-3.
Having smacked his racket on the chair after losing the first set, Cilic finally produced his first ace of the match in his opening service game of the second. But it was to no avail, as he once again got broken, this time on his 13th unforced error as the match threatened to run away from him.
Then something highly unusual happened in the changeover, with Cilic in floods of tears during a medical timeout as he talked to the physio, doctor and tournament supervisor while trailing 3-0.
With Federer walking back to the baseline to receive serve and the Centre Court crowd including UK Prime Minister Theresa May subdued, Cilic sat on his chair, his towel over his head.
It looked like we could see the first retirement in a Wimbledon men's final since 1911, but Cilic regrouped and got on the scoreboard in the second set as he held.
After Federer easily served out the second set, 6-1, in 25 minutes, Cilic got treatment on his left foot. Although he played better after that, he continued to struggle with his movement and was never able to unsettle Federer, one of the sport's best frontrunners.
After Cilic got broken on yet another unforced error for a fifth time to trail 4-3, rain drops started to fall. But it wasn't enough to stop the match and close to roof. Serving for a place in Wimbledon history, Federer took the match on his second match point with a blistering ace down the middle of the court.
"Of course to all my fans in Croatia, it was really tough today and I gave it all and I'm hoping definitely that I'm going to come back here and try it one more time," Cilic said.
"Be proud of yourself and I hope we can play down the road some better ones," said Federer, who extended his lead over the Croat to 7-1.
The final action of Wimbledon 2017 saw Britain's Jamie Murray and Swiss star Martina Hingis win the mixed doubles title with a 6-4 6-4 win over the defending champions Heather Watson and Henri Kontinen on Centre Court.