Chelsea’s win in Salzburg earlier on Wednesday (AEDT) gave Stefano Pioli’s side the chance to finish second in Group E and they grabbed the opportunity with both hands.
Gabbia gave them the lead in the first half and they ran away in the second half, Rafael Leao doubling their lead before Olivier Giroud added a third goal from the penalty spot.
Robert Ljubicic’s stunning own goal capped a night for Dinamo as their qualification hopes were decisively ended, with AC Milan only needing to avoid defeat in their final, crucial group game against Salzburg next week to progress.
Simon Kjaer and Charles De Quetelare had shots on goal blocked in a blistering opener against AC Milan before Gabbia came to the rescue, palming away Mislav Orsic’s inbound header.
Giroud’s header was saved by Dominik Livakovic and Josip Misic did superbly to keep out Ante Rebic’s shot that looked to be heading for goal, but the Serie A champions were in front after 39 minutes.
The first goal came from an unlikely source as Gabbia punished defensive slack by diving in to head home Sandra Tanali’s close-range free-kick.
Leao gave Milan a breather five minutes into the second half, showing great pace to drive into the box on the left too easily and benefit from poorer defending with a clinical right-footed strike.
Milan were aware and they scored a third just before the hour mark when Ljubicic turned Tonali and Giroud found himself in the top left corner.
Things went from bad to worse for Ljubicic when Giroud failed to get a hold of Leao’s rebound and the ball hit the midfielder on the shoulder before flying into his own net.