He outlasted Frenchman Gilles Simon 6-2 6-7(4) 7-6(2) in an absorbing and high-quality final.
With Simon aged 34 it was one of the oldest Queen’s finals, but the two veterans served up a classic for the packed crowd.
Wildcard Lopez, whose ranking has slipped to 113, wasted a match point in the 12th game of the contest.
But a sensational volley put him in 5-2 ahead in the deciding tiebreak and he made no mistake at the second time of asking.
Simon netted a volley at 2-6 and Lopez could celebrate his first title since winning the prestigious Queen’s crown in 2017.
“I thought the best moment of my career was in 2017 but it was not, it’s right now,” Lopez said before making a moving tribute to his watching wife-to-be Sandra Gago.
“She might have heard of this leftie Spanish player but I’ve not won many matches since we met.
“Now I can say to her I’m a decent player.”
Both players appeared to be running on fumes towards the end but there was no rest for Lopez who was due back on court about 30 minutes later.
He was co-star to British favourite Andy Murray in the men’s doubles final.
World number 38 Simon had spent 12 sets and nearly 11 hours on court to reach his first final on grass since losing to Lopez at Eastbourne in 2013.
He looked flat as he dropped serve twice to lose the opener.
But his metronomic groundstrokes began to punch some holes in Lopez’s game and he dragged the second set into a tiebreak.
Lopez moved 4-2 ahead but Simon crunched a superb backhand winner to close the gap.
He then chased down a drop shot to pass the Spaniard at the net as he swung the breaker his way.
A tense third set saw both players fail to convert a flurry of early break points.
But Lopez pressed hard with Simon serving at 5-6 when a punishing forehand return brought up match point.
He snatched a forehand into the net though and Simon held after 12 minutes to set up a tiebreak climax.
Simon, bidding to become the first Frenchman to win the title in the professional era, served his first double-fault of the match at 2-3.
He then watched in disbelief as Lopez picked off his dipping backhand pass with a lunging volley.
There was to be no stopping Lopez then as he became the first wildcard to win the prestigious pre-Wimbledon title since American Pete Sampras 20 years ago.
(Edited by Olawale Alabi)