The Spaniard, the world's third-ranked player, overturned the world No. 12 after saving two match points in the second set. He first saved a match point at 5-3, then closed the gap to 5-4.
Alcaraz will make his first appearance in the semifinals of the capital's tournament, where he has had little success since a difficult debut in 2021.
The match, played on Centre Court, lasted nearly three hours.
This comeback ended with what observers described as the finest point of the tournament: a volley returned at full stretch with a cross-court drop shot.
"When I saved that game at 5-3, I started to let go of all the nerves, to enjoy myself because I was hitting incredible shots,"Alcaraz said.