The hosts took the lead on 19 minutes after top-scorer Antonio Di Natale was slid in by Gelson Ferdandes for his 20th goal of the campaign.
New signing Maxi Lopez replaced a disappointing Antonio Nocerino on 67 minutes and the Argentinian levelled the scores ten minutes later, as he finished off a rapid counter-attack with a cool finish from 12 yards.
As Udinese pushed forward, they were once again hit on the break. Lopez this time provided the assist as he crossed for Stephan El Shaarawy to complete the turnaround with just five minutes remaining.
Milan are now two points clear of Juventus, who have two games in hand.