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 Slam titles, is back in a major final for the first time since winning Wimbledon in 2012.
The top-seeded Djokovic ran off six of the final seven points in a third-set tiebreaker to beat Grigor Dimitrov 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 past 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 US 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 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. Nicknamed "Baby Fed" for a style of play resembling Federer's and long billed as the game's next big thing, he pushed Djokovic to the limit but came up short when he could have forced a fifth set.
"His first semifinal, but he was fighting," Djokovic said. "It was a tough match. Fourth set could have gone either way. ... But overall, I'm just really glad to reach another Wimbledon final."
The match seemed to be headed for a fifth set when Dimitrov went up 6-3 in the tiebreaker, giving him three set points. But Djokovic held firm and erased all three. Dimitrov then served his eighth double fault to go down 7-6, handing Djokovic a match point.
Dimitrov saved that one with a forehand pass to make it 7-7. Djokovic hit a forehand winner on the next point as Dimitrov slipped to the turf -- one his many tumbles. Djokovic then closed out the match with a forehand passing shot that clipped the top of the net.
Dimitrov showed flashes of his talent, hitting more winners than Djokovic (48-45) but had more unforced errors (33-26). Each player broke serve three times.
"Of course I'm frustrated," Dimitrov said of losing the match. "I mean, I came out on the court to win. OK, I think I had a pretty slow start, but at some point I think I got my act together and I was really playing good tennis.
"You never know what would have happened if I had taken that fourth set. I think at the same time I had my momentum. It's just he came on top today, so all the credit to him."
The match was played in tough conditions, with a swirling wind and slippery grass at the back of the court causing problems for both players. Dimitrov struggled particularly with his footing. On one point in the third set, both players ended up face-forward on the grass after an exchange near the net.
Djokovic looked in command after winning 20 of 24 points on his serve to take the first set and going up a break at 3-1 in the second. He had a break point with a chance to go up 4-1, but Dimitrov saved that with an ace and went on to take five games in a row and the set.
The momentum seemed to be with the Bulgarian, as he kept Djokovic at bay with low, slice backhands and forehand winners.
But the match turned back in Djokovic's favor on a key point at 3-3 in the third set. On a break point, Dimitrov attacked Djokovic's second serve with a deep forehand return. Djokovic hit a lucky backhand that dropped into the court for a winner.
Dimitrov played a poor third-set tiebreaker and looked deflated after serving a double fault into the net to fall behind 5-2.
At 1-1 in the fourth set, Dimitrov did something few players do -- he served three straight double faults to go down 0-40. He hit a forehand long on the next to go down a break. Yet Dimitrov showed resolve, breaking right back in the next game with a cross-court forehand winner.
Despite losing, he was pleased with his showing over the past two weeks.
"I think this is the first time for me to be in semifinal of a Slam, so obviously to me that's just positive," Dimitrov said. "I'm not going to overanalyze much what's been happening the past weeks to me because there's no need for that. I think I'm in a good spot at the moment. I'm practicing well. I'm doing good work on and off the court. I'm focusing really on every match that I'm playing, regardless. Doesn't matter what kind of tournament I'm playing.
"It's a good learning curve for me to put myself in such a position and play against those kind of players and attack the top in a different way."
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.
The Associated Press contributed to this report.