Djokovic triumphed 5-7, 2-6, 6-3, 6-2, 6-2 and will face Britain’s Cameron Norrie for a place in Sunday’s final.
It was the seventh time in the 35-year-old Serb’s career that he had battled back from two sets to love down to win.
“I always believed that I could come back. I know the experience I have could eventually prevail in these kind of situations,” said six-time champion Djokovic.
“It was just a matter of momentum shift. I felt that the beginning of the third set is crucial to start well, try to break his serve early. That’s what happened.”
Djokovic had also come back from two sets down as recently as the 2021 French Open against Lorenzo Musetti in the fourth round and then Stefanos Tsitsipas in the final.
Crucially, Tuesday’s quarter-final was his 47th five-set match. For Sinner, it was just his fifth.
“I feel like Sinner, coming into the match, didn’t have much to lose, but he had a lot to lose when he was two sets to love up,” said 20-time major winner Djokovic.
“I could feel that mentally with him. He didn’t have too many five-set matches in his life… not too many matches on the Centre Court.
“So all these things play a role. It does definitely help knowing that you have been in these particular situations and you had success in the past.”
Djokovic is bidding to go level with Pete Sampras as a seven-time Wimbledon men’s champion.
That would put him just one off Roger Federer‘s record of eight.
He appeared set for a routine afternoon when he swept into a 4-1 lead in the opener and had a break point for 5-1 against the 20-year-old Italian.
Sinner, the 10th seed, saved it and rallied to move 6-5 ahead, carving out an opportunity to serve for the set.
Djokovic saved a set point but a netted service return gave the Italian the set.
Sinner, relentlessly unleashing winners from all corners of the court, stunned the top seed again with breaks in the third and seventh games on his way to a two-set lead.
Djokovic immediately left the court just as he had done at Roland Garros last year when he was staring at defeat against Tsitsipas.
“It was just a pep talk, a positive talk. Today it worked,” he said.
“I just felt like I had to change something. I was not playing well, I was not feeling well on the court, I was dominated by Sinner.
“Thankfully Grand Slams are played in best-of-five, so I had opportunity to come back.”
The bathroom talk certainly worked.
A break in the fourth game of the third set enabled Djokovic to cut his deficit.
In control, he levelled the tie with a double break in the fourth set as Sinner took a worrying tumble on his ankle scrambling to the Centre Court net.
Djokovic carved out two more breaks in the decider, the second off the back of a stunning, cross-court backhand on the stretch to go to 5-2 before calmly serving it out.
Norrie reached the semi-finals of a Slam for the first time by defeating 58th-ranked David Goffin of Belgium, 3-6, 7-5, 2-6, 6-3, 7-5.
Norrie said he was struggling at the start of the match, admitting he was forced to dig deep.
“It was all just adrenaline, using my legs and trying to put the ball in the court, and it’s great to get over the line,” said the left-hander.
Norrie, who is the first British man to reach the Wimbledon semi-finals since Andy Murray in 2016, said he was going to “take it” to Djokovic.
The result was tough on Goffin, who made the quarter-finals on his last appearance at Wimbledon in 2019.
In Tuesday’s match, he hit more winners, 49 to 38, and won more points, with his 151 trumping Norrie’s 145.