The Frenchman looked like he might be heading out when his Bulgarian opponent took the opening set courtesy of a single break of serve.
But he responded well, dominating Dimitrov's second serve, to claim a 5-7 7-5 6-4 win in two hours and 15 minutes.
Milos Raonic progressed past Croatian Ivo Karlovic with a 7-6 (7/3) 6-4 victory. The first set was predictably tight, with not a single break-point chance for either player, but the third-seeded Canadian edged it and then saw out the match in an hour and a half.
Fourth seed Gilles Simon, the 2009 champion, booked his last-eight place with a 6-4 6-4 win over Japan's Go Soeda in one hour and 48 minutes. The Frenchman broke serve four times from 12 opportunities.
Simon will now face compatriot Gael Monfils, who knocked out Serbian sixth seed Viktor Troicki 7-5 7-5.
Spanish fifth seed Fernando Verdasco set up a meeting with Serbian top seed Janko Tipsarevic by virtue of beating American Donald Young 7-5 6-4 in one hour and 39 minutes.
Eighth seed Bernard Tomic recovered from a set down against Israel's Dudi Sela to reach his fourth ATP Tour quarter-final of the season.
The Australian won 4-6 6-4 6-3, saving 11 of 13 break-point chances faced to win in two hours and 22 minutes.