Substitute Riccardo Bocalon was Alessandria's hero as he scored twice in the closing stages against Spezia to seal a 2-1 win and book a Coppa Italia semi-final with AC Milan.
Emanuele Calaio had given Spezia an early lead from the penalty spot but the Serie B side wasted a host of chances and were ultimately punished.
Bocalon levelled things up 13 minutes after coming on as a substitute, before sealing the Lega Pro side's place in the last four in stoppage time.
Spezia was gifted the game's opening goal when Vedran Celjak was penalised for holding Nahuel Valentini's shirt in the penalty area, Calaio making no mistake from 12 yards.
However, the 34 year-old striker missed two clear chances to extend Spezia's lead before the hour with weak shots that were easily saved.
With seven minutes of normal time remaining Spezia's profligacy was punished as Bocalon latched onto a loose ball and held off two defenders before coolly slotting past Leandro Chichizola.
The drama was far from over, though, as the 26 year-old kept Alessandria's fairytale run in the cup alive, Bocalon meeting a deep cross with a perfectly placed header.