After a confident start Gulbis couldn't score four set points with the first set hanging on a tiebreaker. The first set lasted for an hour and concluded with Gulbis clinching the victory in the tiebreaker with 12:10.
The second set saw Gulbis make several faults while serving and Lorenzi managing to get a break point and subsequently retain the early lead right into the end of the set.
Gulbis started the third set aggressively but was only able to capitalize on a break point at the end of the match, which proved enough to score a victory. He had an impressive service with 11 aces.
Gulbis, who is enjoying a protected ranking after missing the second half of last season with a wrist problem, will face either Italy's Fabio Fognini (ATP 31) or Slovakia's Norbert Gombos (87) in the quarterfinals.
It will be the Latvian tennis player's first quarterfinals appearance in a major tournament since 2015.