Federer, chasing his record eighth Wimbledon championship, swept past Canada's Milos Raonic 6-4, 6-4, 6-4 to reach his 25th Grand Slam final.
Federer, who owns 17 major titles, broke once in each set and won 61 of 80 points on serve to make it back to a Slam final for the first time since winning Wimbledon in 2012.
The top-seeded Djokovic ran off six of the final seven points in the tiebreaker to beat Grigor Dimitrov of Bulgaria 6-4, 3-6, 7-6 (2), 7-6 (7) to advance to his third Wimbledon final in four years.
It's also Djokovic's 14th Grand Slam final -- and 10th in his last 13 majors. Djokovic won the 2011 Wimbledon title and lost in last year's final to Andy Murray.
The 32-year-old Federer will be playing in his ninth Wimbledon final on Sunday. If he wins, he will hold the outright record for men's titles, which he currently shares at seven with Pete Sampras and William Renshaw.
Federer would also become the oldest men's Wimbledon champion since the Open era began in 1968. The Swiss great has slipped in the rankings the past two years and failed to get to any Grand Slam finals. This could represent his best chance for another major title.
Federer, who has lost only one set and been broken just once the whole tournament, was asked how much it would mean to lift the Wimbledon trophy once more.
"A lot," he said. "I must say I'm unbelievably proud every time I can walk the grounds here and keep on playing this tournament. I know I don't have 10 left, so I'll try to enjoy it as much as I can. Clearly, the first one was unbelievably special in 2003.
"And that I was able to play so successful for so many years here at Wimbledon has been an unbelievable thrill and that I get another chance to go through these kind of emotions is great."
Federer's dominance against the eighth-seeded Raonic was total. Raonic, the first Canadian man to reach a Grand Slam semifinal, had 17 aces but also had four double faults and conceded seven break points. Federer was clinical throughout and saved the only break point he faced.
Federer holds a career 18-16 advantage against Djokovic, but this will be only their second meeting in a major final. Federer beat him for the U.S. Open title in 2007. Overall, Federer has a 6-5 edge in Grand Slam matches. They've faced each other only once before at Wimbledon, with Federer winning in four sets in the 2012 semifinals.
"We know each other's games," said Djokovic, who will move to No. 1 in the rankings with a victory, replacing Rafael Nadal.
"We played many matches on different occasions. We played so many times in semifinals and finals of Grand Slams, different surfaces, big matches over the years. They were very exciting.
"And, of course, most of the matches we play against each other went the distance. So I'm going to be, of course, physically ready and fit to go the distance this time."
The final matchup means that one of the so-called "Big Four" in men's tennis -Federer, Nadal, Djokovic or Andy Murray -- will walk away with a Grand Slam trophy for the 36th time in 38 majors.
One of the four has won Wimbledon title the past 11 years, seven for Federer.
Djokovic, who has lost in his last two major finals and three of the past four, is going for his seventh Grand Slam title.
"Of course, there is plenty of motivation from my side to win this Grand Slam final after losing last three out of four," he said. "I want to try to get the title. It would mean a lot mentally for me."
The 11th-seeded Dimitrov, with his girlfriend Maria Sharapova watching from his guest box on Centre Court, came in with a 10-match winning streak and had been seeking to become the first Bulgarian to advance to a major final. He pushed Djokovic to the limit but hurt his chances with eight double-faults -- including three in a row in one game.
The women's final will be played Saturday, with 2011 champion Petra Kvitova of the Czech Republic facing 20-year-old Eugenie Bouchard, the first Canadian to play in a Grand Slam singles championship match.
For complete Wimbledon coverage, including updated draws and reports from Steve Tignor, head to our tournament page.