Spain substitute Jesus Navas drilled in the decisive penalty after Italy defender Leonardo Bonucci missed.
Italy dominated much of the 90 minutes but were left to pay for their misses.
Emanuele Giaccherini hit the Spain post in extra-time, while Gianluigi Buffon pushed Xavi’s shot on to the woodwork.
Each of the first 12 penalties were converted in a high-quality shoot-out before Bonucci blasted his effort over Iker Casillas’s crossbar.
His miss allowed new Manchester City winger Navas to coolly convert past Buffon to set up an eagerly anticipated clash against the host nation, 2-1 winners against Uruguay in their semi-final, in Rio de Janeiro on Sunday.
Higher quality highlights – click here