La Roja progressed to the Confederations Cup final as the new Manchester City signing slotted home the decisive spot kick after a tight encounter with the Azzurri in Fortaleza
Although the World Cup holders stormed to a 4-0 win over the Azzurri in the Euro 2012 final, this encounter proved far more evenly-contested.
Vicente del Bosque's men monopolised possession but lacked a cutting edge in attack, while Italy missed numerous chances throughout as the match ended goalless.
With nothing to separate the two nations the game went to penalties, where Jesus Navas proved to be the hero as he scored the crucial spot kick as the shoot-out finished 7-6 to Spain.
Cesare Prandelli switched to a three-man defence and his side began impressively, despite letting the Spaniards control possession of the ball.
The Azzurri, though, with the Fortaleza crowd backing them, looked superb on the counter-attack. After Alberto Gilardino had failed to pick out the bottom corner from Antonio Candreva's cross, they became increasingly confident and forged yet more chances to find the net.
Christian Maggio was unable to guide a header from Andrea Pirlo's exquisite pass past Iker Casillas in the 17th minute and Daniele De Rossi's glancing header missed the target 60 seconds later.
In the 19th minute Claudio Marchisio missed the best of the bunch, though, as he nodded the ball well wide of the target from Candreva's cushion despite finding plenty of space between the two centre-backs.
That flurry of activity encouraged Spain to reduce the tempo and steady themselves, but the Azzurri were again next to test the opposing goalkeeper.
Jordi Alba was being nullified by the adventurous combination of Candreva and Maggio, and the latter was only denied a goal when a brilliant Casillas save kept his 36th-minute header out of the net.
Spain almost immediately punished Prandelli's side for their profligacy in front of goal one minute later, but after turning Andrea Barzagli in wonderful fashion Fernando Torres could not find a finish to match as he pulled his shot wide of the target.
With La Roja failing to show an increased threat immediately after the restart Del Bosque introduced Jesus Navas in the 50th minute. The new Manchester City signing had a positive impact, calling Gianluigi Buffon into action with a driven shot from 20 yards shortly before the hour mark.
The conditions began to sap the life from the game as Italy lost the intent on the break and Spain continued to lack creativity. Andres Iniesta attempted to take matters into his own hands, yet after a mazy run from the half-way line he sliced an attempt wide of the goal.
There were chances for both sides to win the game in normal time, though neither team could break the deadlock. Marchisio's attempt from a Candreva cutback was blocked by Gerard Pique before Pedro and the Barcelona centre-back wasted two great opportunities to work Buffon, and extra time ensued.
After three minutes of the additional period Italy had their best chance of the night. Maggio's cross rolled through to Emanuele Giaccherini at the back post, whose attempted shot crashed back off of Casillas' post.
The tempo to the game quickly picked up again and Iniesta's beautiful lifted pass over Leonardo Bonucci was volleyed over by Alba in the 99th minute as La Roja got nearer to breaking the deadlock.
With five minutes left to play Xavi was denied an absolutely magnificent winner when his long-range shot was turned onto the post by Buffon. The Juventus keeper was forced to make another save from Navas one minute later to ensure the game went to penalties.
Candreva got Italy off to the perfect start by dinking the first penalty straight down the middle and all subsequent spot kicks were scored until Bonucci skied from 12 yards with the score level at 6-6. Responsibility fell to Navas who slotted the ball home to send Spain into the final.
Spain will now take place in Sunday's final against Brazil at the Maracana, while Italy will contest the third-place play-off against Uruguay in Salvador on the same day.