The home side came from behind to win after Gianpaolo Bellini's own goal, but the match was soured when a banana was thrown from the crowd at Kevin Constant
Clarence Seedorf's men took the lead shortly after half-time when Gianpaolo Bellini diverted Sulley Muntari's cross into his own net, but German Denis levelled from the penalty spot to ensure a share of the spoils for the home side.
Mario Balotelli hit the post in stoppage time before Frano Brienza's brilliant strike in the 95th minute left the Rossoneri's hopes of a Europa League place in the balance.
The match was soured during the final 20 minutes when a banana was thrown from the crowd at Milan defender Kevin Constant, just a week after a similar incident involving Barcelona's Dani Alves in the game at Villarreal.
Milan made three changes to the side that beat city rivals Inter last weekend, with Marco Amelia, Sulley Muntari and Keisuke Honda coming in for Christian Abbiati, who was suspended, Andrea Poli and Adel Taraabt.
Chances proved few and far between in a first half dictated for long periods by Milan, although the hosts may have taken the lead had Carlos Carmona been able to provide a better finish midway through the first half, but the Chilean's weak shot was comfortably saved by Amelia.
Atalanta again went close in the 29th minute as Denis fired wide from the edge of the area, before Maxi Moralez missed the target with a header from Luca Cigarini's free kick.
However, the best opportunity of the first half came five minutes before the interval as Atalanta goalkeeper Andrea Consigli tipped Mario Balotelli's curling free kick against the crossbar.
Consigli was less convincing moments later when Balotelli fired in another swerving free kick that he could only parry, with Honda heading wide on the follow-up.
Stephan El Shaarawy came on to replace Honda at the start of the second half, the forward returning from injury to make his first appearance of 2014.
Kaka then flashed a header over the bar before Seedorf's men broke the deadlock, albeit in somewhat fortuitous fashion.
Muntari broke down the left and aimed a low cross towards Balotelli, who appeared to be in an offside position. In attempting to prevent the ball from reaching Balotelli, Bellini turned the ball into his own net.
However, the visitors failed to take control of the contest after going ahead and Atalanta levelled when Denis sent Amelia the wrong way with a confident penalty after Carmona had been tripped by Constant.
Bananas were thrown from the crowd at Constant a few minutes later, prompting Philippe Mexes and Nigel de Jong to sarcastically applaud the section of the stands, while the stadium announcer warned supporters over their behaviour.
Balotelli was thwarted by the woodwork again, hammering an effort against Consigli's right-hand post as Milan pressed for a winner.
Yet there proved to be one final twist in the tale as Brienza earned Atalanta three points with a brilliant first-time shot from fully 30 yards out with practically the last kick of the game.