Croatia midfielder Luka Modric became the oldest goalscorer in the competition’s history with his strike after 55 minutes, just 33 seconds after Gianluigi Donnarumma saved the 38-year-old’s penalty.
It seemed enough for his team but Zaccagni whipped a brilliant strike into the top corner on the break in the 98th minute to send Italy through from what was dubbed a “group of death”.
After shipping five goals in the first two games, Dalic opted to shore up the midfield by bringing in Mario Pasalic and Luka Sucic amid four changes.
The coach also kept established trio of Luka Modric, Marcelo Brozovic and Mateo Kovacic despite their struggles in the 3-0 defeat by Spain and 2-2 draw against minnows Albania.
Luciano Spalletti’s Italy beat Albania 2-1 but were dominated by Spain in a 1-0 defeat and the coach shifted to a 3-5-2 formation, dropping Juventus’ Federico Chiesa.
Croatia dominated the opening exchanges against a defensive Italy side knowing a draw would send them through in second place behind group winners Spain.
On his first start at the tournament 21-year-old RB Salzburg midfielder Sucic forced a fine early save from Italy’s Gianluigi Donnarumma with a vicious drive from range.
Azzurri forward Mateo Retegui’s header was deflected narrowly wide at the other end on a rare forray forward, with the two-time winners happy to slow the game down and waste time at corners and throw-ins as early as the 20th minute.
Croatia goalkeeper Dominik Livakovic made a stunning stop to thwart Alessandro Bastoni, found by Nicolo Barella’s tempting cross, as the holders gained control without taking risks.
Dalic, who steered Croatia to the 2018 and 2022 World Cup final and semis respectively, threw on powerful striker Ante Budimir for the second half.
It gave his team a focal point and they looked instantly more threatening and swiftly reaped their reward.
Italy substitute Davide Frattesi handled Andrej Kramaric’s effort and after a VAR review Croatia were given a penalty.
Donnarumma clawed out Real Madrid midfielder Modric’s effort but the veteran could not be denied 33 seconds later.
The Italian goalkeeper made another fine save in the aftermath from Budimir as Croatia kept the pressure up and Modric smashed home the rebound from close range.
He beat the previous record for oldest Euros goalscorer set in 2008 by Austrian Ivica Vastic by 32 days.
Modric was replaced with 10 minutes to go and even some Italy supporters afforded the playmaker an ovation, while they nervously eyed the ever-advancing clock.