Atalanta had the chances to win by an even wider margin as an out-of-sorts Milan put in one of their worst performances of the season.
Milan nevertheless claim the title of winter champions as they top the standings at the halfway point of the season with 43 points, two ahead of Inter Milan after their 0-0 draw at Udinese.
"Today a lot of things were lacking," Milan striker Zlatan Ibrahimovic told Sky Sports.
"I don't want to make excuses, you need to go into every game to get the result. Today we didn't manage that."
Only two Serie A winter champions have failed to finish on top since the league reverted to 20 teams in 2004: Napoli in 2015-16 and 2017-18.
"We're halfway there, this means that we've done well up until now," Ibrahimovic added.
"Now is the most difficult period with a lot of games. We need to stay well physically."
Atalanta moved into the top four on 36 points, a record tally for the Bergamo club at the midway stage of a Serie A season featuring 20 teams.
The visitors started strongly and a goal seemed inevitable by the time Romero stooped to head in, while Ibrahimovic volleyed Milan's best chance of the first half wide at the back post.
Franck Kessie caught Ilicic in the face with an elbow early in the second half to concede a penalty that the Slovenian converted.
Mandzukic, who joined Milan on a free transfer this week, came on for his debut in the 70th minute and needed a matter of seconds before testing Gollini's reflexes with a close-range shot.
But Atalanta's dominance continued as Zapata powered a header off the foot of the post before finding the target when he raced clear in the box to finish at the near post.
Atalanta moved into the top four on 36 points, returning to form in style after back-to-back draws against Genoa and Udinese.