The Rossoneri also had two goals controversially disallowed for a Clarence Seedorf offside flag and Massimo Ambrosini's push as Sergio Floccari and Antonio Langella had the visitors 2-0 ahead before halftime. Paolo Maldini pulled a goal back on 84 minutes before Pirlo's last-minute spotkick failure.
Milan coach Carlo Ancelotti fumed: "I know my players and what they can do from here until the end of the season. We still have a possibility, but there are no more second chances after this. We must not look for alibis.
"We are aware of the difficult moment we're going through and will try to get out of it. Not qualifying for the Champions League would weigh heavily on us. We have a possibility and must make the most of it."
This loss to Atalanta was Milan's second consecutive 2-1 defeat at San Siro after an identical dismal performance against Sampdoria 10 days ago.
"We made the usual mistakes that we tend to make at home," admitted Ancelotti. "It was a bland start and a bit lazy, so in the end we paid the price. In some situations we were very distracted, just as we were against Samp."
He contined: "Our entire game is to be wiped off the slate, there was nothing to be salvaged from it. In the second half we tried with a bit more grit, but left ourselves very open to the counter.
"We cannot carry on like this. We hope to have Kaka back for the next game, but at the moment we are not defending well and not attacking well either.
"Something will change, but I am not so much talking about the players as the attitude. We'll see what happens on Saturday."