Granollers, ranked 129 in the world, made a flying start but he never recovered after spurning a match point and collapsed in the latter stages of the second set, losing the tiebreak before being wiped out in the third.
"It's really hard when you are so close and don't kill off the game. It feels very tough to lose today, I'm not thinking positive things right now," Granollers told reporters.
Feliciano Lopez of Spain, who beat Dusan Lajovic 6-4 2-6 6-4, and Malek Jaziri of Tunisia, who downed Ernesto Escobedo 6-4 6-3, will both join Goffin in the third round.
US Open
David Goffin casts doubt on US Open participation
11/07/2020 AT 11:10

David Goffin of Belgium plays a backhand against Marcel Granollers of Spain in their match during day three of the Barcelona Open Banc Sabadell on April 24, 2018 in Barcelona, Spain.

Image credit: Getty Images

Spaniard Roberto Carbelles Baena earned the right to face world number one and 10-times tournament winner Rafael Nadal on Wednesday after comfortably beating Austrian Andreas Haider-Maurer 6-2 6-4 in a first-round match.
Japan's Kei Nishikori also enters the second round on Wednesday after receiving a bye and will face Spaniard Guillermo Garcia Lopez for the right to play Nadal or Carbelles Baena in the last 16, potentially setting up a re-match of last Sunday's Monte Carlo Masters final which Nadal won.
Former world number one Novak Djokovic will face Slovak Martin Klizan in the second round on Tuesday after receiving a late wildcard entry as he continues his comeback from a long injury lay off after getting knocked out in Monte Carlo in the last 16.

Novak Djokovic

Image credit: Getty Images

"I hadn't planned on coming here but last Thursday when I finished in Monte Carlo we decided we wanted an invite," the Serbian told a news conference.
"I haven't played much this year and I want to play without thinking about my shoulder. Monte Carlo was the first tournament I've played in over a year without any pain and I'm happy about that."
Djokovic could meet Nadal in the quarter-finals if they both win their next two matches.
Spaniard Jaume Munar will meet last year's runner-up Dominic Thiem in the second round after seeing off Joao Sousa 6-4 3-6 7-5.
Davis Cup
Nadal bagels GB's Evans to set up doubles decider in semi-final
23/11/2019 AT 20:35
Shanghai Masters
Federer admits he got lucky in Goffin win
10/10/2019 AT 16:18