The Serb won 6-3 6-3 3-6 6-3, with both men appearing to struggle physically in the latter stages.
Djokovic, 27, will play eight-time champion Rafael Nadal or Britain's Andy Murray on Sunday.
He is trying to become the eighth man in history to win the career Grand Slam.
"The first two sets were very good for me and then he started to play with fewer errors," said Djokovic."It was very difficult to maintain my concentration because the conditions were difficult for me, but I'm very happy to have made it into the final."
Djokovic remains on track to win a first French Open title but will hope for a cooler afternoon on Sunday.
After easing through the first two sets against Gulbis and doing an excellent job of subduing the Latvian's power, the heat began to take its toll in the third set.
He fought off break points in the second and sixth games before succumbing in the eighth when Gulbis fired a backhand winner down the line.
The crowd was finally roused by the contest on a sultry afternoon, but Gulbis appeared to be having his own difficulties with a back issue, and the fourth set was a fractured, sluggish affair.
Djokovic moved 2-0 up when Gulbis buried a forehand in the net, only to hand the advantage straight back - smashing his racquet in anger and accepting the point penalty by raising his hands to the jeering spectators.
A fifth set seemed possible until the Gulbis challenge evaporated in a matter of a few points in game eight.
From 30-0, a double fault and two errors gave Djokovic the chance to serve for the match and the Serb had to do little more than get the ball in play, with Gulbis firing a tired forehand into the net on match point.