A near-60,000 crowd saw Federico Chiesa's stunning strike open the scoring before Alvaro Morata sent the game to extra time.
However, Morata and Dani Olmo missed in the shoot-out as Italy progressed to face England or Denmark on Sunday.
Morata once described training against Giorgio Chiellini at Juventus as "being put in a cage with a gorilla and you have to steal his food".
With 10 minutes left, Morata left the 36-year-old trailing with a calm finish completely out of keeping with his demons in front of goal throughout the tournament.
Even before the Euro began, Morata had to listen of chants of "how bad are you" from his own fans in a pre-tournament friendly against Portugal.
He missed a penalty and a host more chances as Spain failed to win either of their opening group games, but came good with a stunning finish to turn a rollercoaster last-16 tie against Croatia, which La Roja eventually won 5-3, back in his side's favour in extra time.
Often criticised for his faith in the Juventus striker, Luis Enrique left him on the bench for the first time in the tournament as he opted instead for a strikerless system with Olmo, Mikel Oyarzabal and Ferran Torres forming a flexible front three.
But that trio were all wasteful as Spain dominated but failed to take their chances and looked set to exit when Chiesa showed them how to be clinical with a sumptuous strike on the hour mark.
Morata was immediately summoned from the sidelines by Luis Enrique and finally produced some reward for Spain's dominance of the ball when he played a neat one-two with Olmo and nonchalantly slotted past the grounded Gianluigi Donnarumma.
However, Donnarumma was the hero of the shoot-out as he saved Morata's meek penalty low to his left and Jorginho rolled home the next spot-kick to ensure Italy return to Wembley at the weekend.
Despite travelling fans from both countries being shut out due to quarantine rules, 60,000 supporters were allowed into Wembley as part of the biggest sporting crowd in the United Kingdom since the coronavirus pandemic hit in March 2019.
Any fears that of a flat atmosphere were dispelled well before kick-off, with thousands of Italian and Spanish expatriates drapped in flags and shirts colouring the home of English football red and blue.
The presence of English supporters was heard with a short-lived rendition of "football's coming home" that was quickly drowned out by boos from both sets of fans.
Until April, top-level football in England had been largely forced behind closed doors for over a year.
But it was like turning the clock back as both sides scored in front of masses of their own support in a pulsating second half worthy of the stage of a European Championship semi-final.
Had Euro 2020 gone ahead as planned 12 months ago, the 18-year-old from Tenerife would not have been close to Luis Enrique's squad.
But winning just his 10th cap, the Barcelona midfielder again showed why he is a fitting heir to Andres Iniesta for club and country.
One sumptuous through ball cut through the normally impenetrable Italian defence early on and deserved a better finish from Mikel Oyarzabal.
Italy's 33-match unbeaten run has been built on the midfield trio of Jorginho, Marco Verratti and Nicolo Barella controlling games.
But Spain again showed no country is as prolific at producing midfield maestros as Sergio Busquets's experience and Koke's energy complemented Pedri's poise.
In the 90 minutes, he completed all of his 55 passes.
Just as impressively, the teenager continued to demand the ball well into his third consecutive game to go the full 120 minutes.
Pedri played all but one minute of Spain's campaign and has covered more ground than any other player in the tournament.