Despite the visiting team's struggles in the league, Filippo Inzaghi's men failed to get the better of them as they fell further behind the Champions League spots
The Atalanta captain scored a 12-minute hat-trick at San Siro two seasons ago in a 4-3 win against Inter, but needed just the one goal to settle Sunday's affair and extend Milan's winless run in Serie A to four matches.
Having withstood what Milan threw at them early on, Atalanta took the lead when Denis - who also scored in a 2-1 win over Milan in May - made the most of slack defending with a deft finish 33 minutes in.
Inzaghi had spoken in the week of a need to win ugly occasionally if Milan were to put their European aspirations back on track, but stoic defending from the visitors put paid to that.
While Giampaolo Pazzini's header nestled on the roof of the net, Stefano Colantuono's side were able to frustrate their hosts and pick up only a second away league win of the campaign - and their first since September.
Denis gave Milan a scare early on when he fired across goal after the hosts lost possession in midfield and offered another warning when he rattled the crossbar after 17 minutes.
Inzaghi must have been concerned to see Stephan El Shaaraway limp off after a challenge with Yohan Benalouane, but the Italy international was able to resume and proved to be instrumental in creating Milan's next opening.
The forward tricked his way into the box before unleashing a fierce shot which was saved by Marco Sportiello, with Giacomo Bonaventura only able to divert the rebound over the bar against his former club.
Denis then made Milan pay for lax defending soon after the half-hour mark, as Maximiliano Moralez coasted through midfield and played in his captain.
The experienced Argentine then fired past Diego Lopez with the outside of his right foot to open the scoring and there was another blow for Inzaghi, as Daniele Bonera was injured and Pablo Armero came on to replace him.
Jeremy Menez flashed a free-kick wide just before half-time, while birthday boy Riccardo Montolivo saw a tame set-piece easily cleared early in the second period.
As in the first half, Milan enjoyed plenty of possession but failed to make the most of it - Nigel de Jong next to go close with a header deflected off target by Montolivo.
The pressure continued after the hour-mark, but Colantuono's side stood firm as Inzaghi's men struggled to engineer clear-cut chances other than Pazzini's angled header off target.
Denis' strike proved to be the winner as Atalanta's survival chances were given a shot in the arm, while Milan have work to do if they are to regain a spot in the top five.