Kyrgios was losing 4-3 to Austria's Dominic Thiem when a elbow injury forced the Australian to retire.
The injury throws Kyrgios' French Open campaign into doubt with the 20-year-old looking to build on victories against Rafael Nadal and Roger Federer in the past 12 months.
Fellow Aussie James Duckworth moved through to the quarter-finals after being assisted by the withdrawal of top seed Gilles Simon.
A neck injury forced Simon's early exit with Duckworth subsequently fought his way past lucky loser Quentin Halys winning 7-6 (7-0) 7-6 (7-5) to reach the last eight.
In the absence of Simon, third seed Gulbis may fancy his chances of repeating his 2014 title-winning success, but the defending champion had to overcome a second-set blip to defeat Alexandr Dolgopolov 7-5 4-6 6-1.
Gulbis fired down 14 aces and broke serve on five occasions to set up a last-eight showdown with Thiem.
Fourth seed Mayer remains a contender and needed just under 75 minutes to see off the challenge of wildcard Lucas Pouille in a 6-4 6-0 victory.
Dusan Lajovic was taken the distance in a 6-3 4-6 7-5 beating of Pablo Carreno-Busta. Borna Coric also progressed after the Croatian negotiated his way past Gianni Mina in a 7-6 (7-4) 6-3 victory.