Gasquet claimed the first set before racing into a 3-0 lead in the second with an array of shots that the world number four had no answer for.
© Getty Images
Gasquet handed the second to his opponent with two double faults, before Wawrinka claimed the third with an assured display, and it looked as though the 30-year-old was poised to dominate the fourth and set up a last-four clash.
However, Gasquet rallied and Wawrinka was guilty of two double faults to hand parity to the Frenchman after a back and forth set on Court No. 1.
French Open champion Wawrinka then saw himself 5-3 down in the fifth set and looked on course for a last-eight exit, before fighting back to draw level.
However a couple of poor backhands from Wawrinka gave Gasquet the advantage once again before the Swiss made it 6-6 as the pair played past the three-hour mark.
An exhilarating final set was eventually taken by Gasquet 11-9 to move into the last four of the tournament.