The 17-time Grand Slam champion excelled once the roof was closed early in the third set, giving Murray little chance to end Britain's 76-year wait for a homegrown men's champion.
Federer is now 17-7 in Grand Slam finals, including 7-1 at Wimbledon. Murray dropped to 0-4 in major finals, with three of those losses coming against Federer.
The last British man to win the Wimbledon title was Fred Perry in 1936.
Sunday's match was the first Wimbledon singles final to be played with the roof closed. The roof was first used at the All England Club in 2009.