Arkadiusz Milik scored with his first touch as a substitute to send Juventus through to the Coppa Italia final. (More Football News)
Juve had seen their 2-0 lead over Lazio from the first leg wiped out by a double from Valentin Castellanos.
But Poland striker Milik found the net seconds after climbing off the bench as Juve were beaten 2-1 on the night but progressed 3-2 on aggregate.
Juve will face either Fiorentina or Atalanta in the final next month.
The visitors were first on the attack and Filip Kostic’s blocked shot ricocheted to the feet of Andrea Cambiaso, whose low drive flew inches wide.
But it was Lazio who took the lead on the night, and halved the deficit on aggregate, after 12 minutes.
Luis Alberto swung in a corner and Castellanos got up above Alex Sandro at the far post and buried his header past Mattia Perin.
The two goalscorers from the first leg, Dusan Vlahovic and Federico Chiesa, almost combined to equalise.
Chiesa teed up Vlahovic to prod home from close range but his effort was saved by Christos Mandas.
Juve midfielder Manuel Locatelli was dealt a personal blow when he was booked for a foul on Nicolo Casale which means he will miss the final.
Castellanos should have levelled the tie two minutes before half-time when he found himself one-on-one with Perin.
But the Juve keeper came out quickly and was able to make a fine save to preserve the lead.
However, the Argentinian made no mistake three minutes into the second half after he was played in by Luis Alberto.
Castellanos used his strength to burst between two defenders before tucking his finish past Perin.
Vlahovic was denied a goal by a stunning piece of last-ditch defending by Adam Marusic, who slid in to block as the striker looked certain to tap in Weston McKennie’s pull-back.
But Massimiliano Allegri’s substitutions had an immediate effect after Timothy Weah’s cross-shot was tapped in at the far post by Milic with seven minutes to go to send the 14-time winners through.