The game shifted in the second half, with Fiorentina taking the lead 10 minutes in through Robin Gosens' first Serie A goal of the season. However, AC Milan responded quickly, equalizing in the 63rd minute with a stunning strike from 25 yards out by Rafael Leao.
The hosts came close to taking the lead again, but Santiago Gimenez's close-range attempt was tipped over the bar by David de Gea. With the match seemingly destined for a draw, AC Milan was awarded a penalty via VAR with five minutes remaining, and Leao coolly scored the spot-kick to put his side 2-1 up.
The win sent AC Milan to the top of the Serie A table by a one-point margin, and it marked a significant milestone for manager Stefano Pioli, who reached his 500th Serie A match as a manager.
Catch up on all the match stats here.