Six-times champion Federer produced a vintage display to beat world number one Djokovic on Centre Court.
The Swiss maintained his record of never losing a Wimbledon semi-final to reach a record eighth showpiece match at the All England Club with a dominant performance on Centre Court.
After the first two sets were shared in less than an hour, the match came alive in the third set.
Serving at 4-5 Djokovic blazed a smash long at 15-30 to give Federer two set points. Djokovic saved the first with a forehand but Federer seized his chance, winning a sensational 20-stroke rally with a smash to move within a set of the final.
Djokovic could not recover and dropped serve early in the fourth set as Federer rolled to his first final at the grasscourt Grand Slam since he beat Andy Roddick in 2009.
Federer held his nerve when he served for the match, sealing it after two hours and 19 minutes of high-octane action when Djokovic netted a forehand return.
"I'm ecstatic, I'm so happy," Federer said immediately after walking off court to huge applause.
"I played a great match today and it's been a tough tournament for me really. But I was able to play some fantastic tennis today and I thought Novak played good too.
"The first two sets went really quickly and then the third set was really key and I managed to step it up and maybe get a bit lucky because he also had break points near the end of the third.
“It was a lot of fun out there today."
Looking ahead to a final against either Briton Andy Murray or Frenchman Jo-Wilfried Tsonga, who he lost to in the quarter-finals last year, the 30-year-old said: "I lost to Jo here last year and Andy's beaten me more than I've beaten him I think.
"I have a tough task ahead of me, there's a lot on the line because I can get all-time Grand Slam record and world number one so I have pressure, but I'm excited about it."
Federer will return to the top of the world rankings if he equals Pete Sampras's seven Wimbledon titles on Sunday.
It would also mean he matches the American's 286 weeks spent as world No.1.
He has only lost one final in SW19, to Rafael Nadal in 2008.