"I am getting closer," Murray, who had twice lost to Federer in straight sets in Grand Slam finals, tearfully told the crowd after the match.
""I was told the other day that 'this is your best chance because Roger is 30 now.' He's not bad for a 30-year-old. He had some struggles early on (this tournament) with his back and today he showed us what fight he has got left in him.
"I'm going to start crying again... Everybody always talks about the pressure of playing at Wimbledon, how tough it is, ... the people watching make it so much easier to play - they make it incredible," Murray added as he was given a rapturous round of applause.
Swiss third seed Federer recovered from a sluggish start to dominate the match and return to the top of the world rankings, ending Murray's hopes of becoming the first British man to win the title on home soil for 76 years.
After sharing the first two sets, rain halted the contest for 40 minutes early in the third and when the players returned under the closed roof on Centre Court Federer took control.
He made the decisive break in a marathon sixth game and broke again for 3-2 in the fourth set before sealing victory on his second match point in three hours 24 minutes.
"I played some of my best tennis in my last couple of matches," Federer told the crowd after lifting the trophy.
"I couldn't be more happy. It feels being great being back here as the winner and it's a great moment. It feels nice to have this trophy back after three years."
Federer also offered Murray some words of encouragement.
"I really do believe deep down in me he will win grand slams, not just one. I do wish him all the best. This is genuine. He works extremely hard," he said.
"Things just didn't quite turn out for him in the finals that he hoped for. But today I'm sure he got another step closer to a grand slam title for him. I really do believe and hope for him that he's going to win one soon."