Djokovic prevailed in the 7-6 (7/1), 3-6, 6-4, 4-6, 6-0 match that seesawed until that final set.
The world's number one now faces Scotland's Andy Murray, seeded sixth, in Sunday's final.
Wawrinka, the defending Australian Open champion, stayed very much in the game that ran to three hours and 30 minutes until the final set when tiredness seemed to get the better of him.
“I was ready for the battle and it was a great battle,” Djokovic said afterward.
“We pushed each other to the limit and I congratulate Stan on a great tournament."
The clash was Djokovic's toughest match of the tournament and his serve was broken five times in a another titanic duel with the Swiss world number four.
It was their fourth straight Grand Slam encounter to go to five sets with Djokovic winning three of them. He lost to Wawrinka in the quarterfinals at last year's Australian Open.
The top seed is through to his fifth Australian Open final after winning his previous four deciders in Melbourne.
He beat Murray in the 2011 and 2013 finals.
But Murray also has form against Djokovic, beating him in the 2012 US Open and 2013 Wimbledon finals.
It was not a convincing performance from Djokovic, who made 49 unforced errors to 27 winners and won just 70 percent of his first serves, but crucially he broke Wawrinka's strong serve seven times.
"Stan stepped it up and credit to him for taking the match to the fifth set," Djokovic said.
"I managed to stay consistent and tough in the right moments in the fifth set, served well when I needed to and I'm just so glad to go through."
Djokovic had lost only one of his 74 service games prior to the semifinal, but Wawrinka broke him in the seventh game of the match with a series of withering backhands.
But the Serb hit straight back with outstanding side-to-side movement to level up with the set going to a tiebreaker.
Djokovic was too strong in the tiebreak with Wawrinka too loose with his shots to drop the opening set.
The Swiss fought off break points in his opening serving game of the second set, but Djokovic double-faulted on break point in the sixth to lose the set.
Both players traded service breaks in the third set, but the world number one seized control after Wawrinka could not close out a 40-15 lead and he reeled off the next four points to take the lead in the match.
But again Wawrinka hit back with two breaks in the fourth set to take it into a fifth, just like their three previous Grand Slam encounters.
Two double-faults and an overhit backhand cost Wawrinka an early service break in the final set and another errant backhand lost him a second service to hand the Serb a winning 4-0 break.
Wawrinka said he was "mentally completely dead" after the match.
A shortened off-season caused by Switzerland's euphoric first ever Davis Cup win in late November had him mentally jaded after winning five matches to reach Friday's semifinal.
"I'm really happy with my level," Wawrinka said.
"It was mentally that I think I'm paying for the price to finish off the season with Davis Cup and not having a bigger off-season," he said.
"I was trying to focus really well to start the year well with winning Chennai and being here trying to do the best.
"I told my coach before the match that I was mentally completely dead and had no battery."
Sporting a 'Stan the Man' shirt, Wawrinka said he was planning to take a week's break before his next tournament and had adjusted his playing schedule this year to allow for more rest and practice.