Heading into Tuesday's (AEST) final fixture in Group A3, Hungary needed only a draw to complete a remarkable run through the competition to next year's four-team fight for the top prize.
But Roberto Mancini's European champion, still smarting from its failure to qualify for the 2022 World Cup, delivered a composed performance to break its opponent's hearts in a taut encounter.
Marco Rossi's side can nevertheless take pride in its achievements, following a campaign that saw it defeat England twice and Germany once to finish second in the end.
Amid raucous home support urging Hungary on to make history, it had looked bullish from the off, with Dominik Szoboszlai offering an early threat for the host.
But Hungary was undone by its lacklustre awareness at the back, and when Wilfried Gnonto pressed Adam Nagy's soft back-pass off Peter Gulacsi, Raspadori was able to round the prone keeper for a simple finish.
Italy held a one-goal lead through to the interval, and it took just seven minutes for it to double it afterwards, with Dimarco getting across Loic Nego at the far post to crash Bryan Cristante's cross into the roof of the net.
Hungary pushed for a response late on, but none was forthcoming – and with the full-time whistle, it was the Azzurri who booked their spot alongside Croatia and the Netherlands for next year's finale.