Trailing 2-0 from the first leg, Villarreal sparked hopes of a remarkable turnaround in the return at the Estadio de la Ceramica after Boulaye Dia finished in the third minute and Francis Coquelin headed in another to level the tie at 2-2.
But Jurgen Klopp threw on Diaz for Diogo Jota at the interval to shake Liverpool into life and it worked, the visitors scoring three times in 12 minutes to kill off Villarreal’s revival and advance to their third Champions League final in five years.
Liverpool will await the winner of Real Madrid and Manchester City, who play their second leg at the Santiago Bernabeu on Wednesday, with City leading 4-3 from the opener last week.
Either City or Madrid will offer a sterner test than Villarreal, but after a chastening experience at Anfield last week, Unai Emery’s side delivered a spirited performance that rattled Liverpool and showed why they knocked out both Juventus and Bayern Munich to reach the semi-finals.
Liverpool were careless, perhaps complacent even, in the first half but sensational in the second, finding an intensity and pace Villarreal were simply unable to match.
Diaz, who started on the bench but was integral to the fightback, was excellent again and may soon be an automatic starter for Klopp.
A banner draped behind the Villarreal goal at one end read “90 minutes from our dream” while before kick-off the stadium announcer shouted “it’s possible, the comeback is possible!”
And if anyone inside the ground was still sceptical they were given an early injection of belief in the third minute as Pervis Estupinan swung in a cross from the left to Etienne Capoue at the back post.
Under pressure from Andy Robertson, Capoue skewed his finish horizontally, landing perfectly for the arriving Dia to sidefoot in.
Liverpool occasionally threatened on the break, with Mohamed Salah rolling Estupinan down the left and feeding Jota in the middle but Geronimo Rulli was quick to rush out and claw the ball away.
But Liverpool lacked their usual control and precision, with Alisson Becker booting the ball into touch before Naby Keita’s misplaced pass back to his own defence almost resulted in Giovani Lo Celso earning a penalty.
The second goal came four minutes before half-time as Pau Torres launched a long ball from deep for Capoue to run onto.
Capoue’s first touch cannoned away from him but he recovered, controlling and twisting away from Robertson before hanging up a superb cross with his left foot to the back post, where Coquelin climbed above Trent Alexander-Arnold and headed in.
The half-time whistle prompted huge cheers from the home fans, whose team were level in the tie, and a change from Klopp as Diaz replaced Jota.
Liverpool looked like a team smarting from a scolding after the break. They were rushing now to take throw-ins, eager to find the intensity they had previously lacked.
Alexander-Arnold’s deflected shot from distance looped onto the crossbar. Diaz volleyed over at the back post. And then Fabinho fired in, latching onto a Salah pass and shooting early through the legs of Rulli, who seemed to have expected the cross.
This was a more familiar Liverpool, hitting a level Villarreal could not match, and five minutes later they scored a second, restoring their two-goal advantage on aggregate.
Alexander-Arnold was given too much space on the right and floated a cross into the area where Diaz, off-balance, aimed an excellent header down and in.
Seven minutes later, Liverpool delivered the final blow, as Rulli rushed out to close down a launched ball forward but failed to get there first.
Mane sprinted clear and rolled into an open net before Capoue was sent off, earning a second yellow card with six minutes left.