Confronted with Zverev's relentless serve, American 13th seed Fritz looked to be heading home but broke the German on the way to winning the third set.
It was the first time the former world number two had been broken in the entire tournament.
Fritz, who won the Eastbourne International on grass last month, edged the fourth set on a tie-break.
Hitting freely, the American broke again in the fourth game of the decider when Zverev, who looked like he had no answer to his opponent's power, went long with a forehand.
Fritz powered through his service game to lead 5-2 and although Zverev clung on, Fritz sealed the match in style.
"It was amazing to do that on Centre Court, two sets down in front of this crowd. It's a dream," he said.
"The thing was I still felt I was playing really well for being down two sets. I was just thinking it sucked to be playing this well and to lose in straights.
"So let's take the third, I took it one at a time. I had that belief. It was just a couple of points here and there."
The American, who hit a total of 69 winners against 23 unforced errors, will face Italian 25th seed Lorenzo Musetti in the quarter-finals.
Fritz spread his arms wide and roared as he celebrated his epic fightback in a match lasting nearly three-and-a-half hours.
It is his second appearance in the Wimbledon quarter-finals after he lost a five-set thriller to Rafael Nadal in 2022.
Defeat for Zverev means the German, who reached the semi-finals at the 2024 Australian Open and was runner-up at Roland Garros last month, has still never reached the last eight at Wimbledon.