Aussie finals: It's a Djokovic-Murray rematch, while Williams faces Kerber
The Serbian took the first two sets 6-1, 6-2, but Federer hit back to take the third 6-3.
The world number one regained control in the fourth set, breaking the Swiss star at 4-3 and then serving out to love to complete the victory.
Djokovic admitted he was delighted with his performance: "I played unbelievable in the first two sets, but that's what's necessary against Roger," he said.
"He's been playing so well, I knew he'd try and be aggressive. But I executed perfectly, and after those first two sets it was a battle in the end.
"In most slams I've won, I've had at least one very tough match, and the match against (Gilles) Simon made me focus on what I need to do better. At the end of the day, you need to make sure your convictions are stronger than your doubts.
"I'm at the peak of my career, and am enjoying it at the moment."
Djokovic will face Great Britain's Andy Murray in the final following his epic five-set victory over Milos Raonic.
The Canadian gave Murray an almighty scare, but world number two eventually prevailed 4-6, 7-5, 6-7, 6-4, 6-2 to reach his fifth Australian Open final. Raonic struggled with a groin injury toward the end of the game, allowing Murray to comfortably win the fifth set.
Speaking after the game, Murray was effusive with his praise for his opponent:
“It was tough, but in the tie-break he didn’t miss one first serve,” Murray said. “He has one of the best serves in tennis but I got a slightly better read on it as the match went on. That was the key."
"He definitely slowed down in the fifth set, which was unfortunate for him. He was struggling with his movement. You just have to deal with your side of the net as best you can.”
Murray will meet Djokovic for their fourth Australian Open final in six years. When asked about his strategy to beat Djokovic, he said:
“A lot of things are important when you’re playing against the best player in the world. I need to not have any lapses in concentration. We’ve played a bunch of times here. Hopefully this time it can be a different result.”
Serena Williams is through to the women's final after a dominant display against Poland's Agnieszka Radwanska.
The 34-year-old triumphed 6-0, 6-4 win to seal a 26th Grand Slam final appearance.
Williams took the first set in just 20 minutes, but Radwanska improved in the second to make a game of it.
She broke the American's serve in the sixth game to level at 3-3, but Williams broke again in the ninth game before successfully holding serve to win the match.
"Going against Aga, you have to be ready or be ready to go home and I was able to do everything that I needed to do," said Williams.
"I've always said that when I'm playing at my best, it's difficult to beat me."
Her final opponent will be Germany's Angelique Kerber who progressed after beating rising British star Johanna Konta 7-5, 6-2.
Williams is chasing a seventh Australian Open singles title and has lost just once to Kerber in their previous six meetings.