The Canadian world number six, playing for only the second time since February due to injury, battled to a 6-7 (5/7) 6-3 7-6 (7/3) victory over his British opponent in just over two and a half hours.
He will now face Australian sixth seed Bernard Tomic, who overcame Brazil's Rogerio Dutra Silva 7-5 6-3.
World number eight Marin Cilic, the second seed, is also through after the Croatian saw off Damir Dzumhur of Bosnia and Herzegovina 6-3 6-2. Cilic's last-eight opponent will be Belgian eighth seed Steve Darcis, a 6-2 6-1 victor over Jiri Vesely of the Czech Republic.
At the BMW Open in Munich, second seed Roberto Bautista Agut beat Marius Copil 4-6 7-6 (7/3) 7-5 to advance to the quarters, where he will face German qualifier Yannick Hanfmann, who shocked eighth seed Thomaz Bellucci.
Hanfmann - at 273 in the world, ranked 216 places lower than his Brazilian opponent - defeated Bellucci 7-6 (7/5) 4-6 7-5.
There were no such problems for the third seed Alexander Zverev as he beat Jeremy Chardy 6-4 6-4 to set up an all-German meeting with Jan-Lennard Struff, the seventh seed who got past another home favourite, Tommy Haas, 6-4 7-5.
Meanwhile, at the Estoril Open in Portugal, top seed Pablo Carreno-Busta beat Tommy Robredo to progress to a last-eight match against Nicolas Almagro, the man he lost to in last year's final. Almagro booked his spot by defeating Gastao Elias.
There was also a round two victory for second seed Richard Gasquet over Carlos Berlocq, with him now set to face Kevin Anderson, who beat qualifier Joao Domingues.
Read the original article on Eurosport: Milos Raonic through to quarter-finals in Istanbul on comeback from injury