They clearly benefited from their good fortune, as the hosts missed chance after chance, including a penalty.
Late in the first half, their goalkeeper Provedel conceded a penalty, which Hernandez missed.
Before the break, Pioli’s men took the lead when Leao lobbed Provedel after sliding onto a through pass.
The visitors failed to demonstrate any attacking danger in the first half, with Saelemaekers and Ibrahimovic both wasting opportunities to put the game out of reach.
Motta’s team gained control of the game and equalised on 64 minutes, with Agudelo scoring after being pointed out by Verde.
Late in the game, Milan heaped on the tension and even had Messias put the ball in the net, but the referee had already blew for a previous foul.
After Ibrahimovic’s header was pushed over the crossbar, Spezia went down the other end and took all three points.
Gyasi calmly slotted into the far corner after Kovalenko pounced upon a mix-up at the back and squared it for him, igniting tremendous celebrations.
— AC Milan (@acmilan) January 17, 2022
Milan misses out on a chance to move top and remains in second place in Serie A, with local rivals Inter remaining in first place and now having a game in hand.
They’ll play Juventus next, followed by a crucial match against Inter.
Spezia has moved up to 14th place, six points clear of the relegation zone, thanks to a spectacular late winner.
When they face Sampdoria the next time out, they will try to continue their winning streak.