After saving five break points and breaking Quinn twice in the opening set, Alcaraz was pushed much harder by the 21-year-old American in the second.
The players exchanged breaks on three occasions and Alcaraz, 21, had to save a set point in the tie-break before finally winning through.
“I made some mistakes, I found it hard to maintain my level, but I am happy to have solved the problems that came in the second set, and to end up winning in two sets,” Alcaraz told TVE.
Alcaraz is building up to the start of the French Open where he is aiming to win his third title at Roland Garros.
The Spaniard, who won on clay at the Monte Carlo Masters last week, missed last year’s French Open because of injury after winning in 2022 and 2023.
Earlier, defending Barcelona champion Casper Ruud sailed into the last 16 with a 6-4 6-3 win over Colombia’s Daniel Elahi Galan.
Norwegian world number 10 Rudd, who has not won a tournament this season, hit 25 winners and did not face a set point.
Last year’s runner-up Stefanos Tsitsipas, the world number 16, beat Reilly Opelka 6-2 6-2.