After losing the opening set tie-breaker without collecting a point, sixth seed Del Potro broke Elias' serve in the first game of the second set but failed to capitalise.
With the set level at 4-4, the 26-year-old Portuguese claimed the last two games and will face Raonic in the last eight on Thursday after the Canadian defeated Denis Istomin of Uzbekistan 6-4 6-3.
Tsonga takes first claycourt title in Lyon
27/05/2017 AT 14:52
Raonic, the world number six, fired eight aces and won 25 of his 30 first-serve points as he dominated a match lasting an hour and 25 minutes.
Home favourite Jo-Wilfried Tsonga fought back to secure a 6-7(2) 6-2 6-3 victory over Argentina's Carlos Berlocq.
The second seed, who failed to progress beyond the second-round in Monte Carlo and Madrid, will face Karen Khachanov of Russia in the quarter-finals.
Tsonga reaches maiden final on clay
26/05/2017 AT 16:28
Simon sees off Edmund to reach quarter-finals of Lyon Open
24/05/2017 AT 17:46