A largely uneventful match of few chances came alive in the 89th minute when Stefano Denswil headed in Lasse Schone's corner for Ajax.
But the home fans' celebrations were cut short seconds later as Mike van der Hoorn fouled Mario Balotelli and the Italy striker fired in the resulting penalty - a week after missing his first spot-kick as a professional.
Up to that point, the two teams had done an effective job of cancelling each other out, with the majority of those handful of chances they did create coming from set-pieces.
Ajax threatened early on, but Kolbeinn Sigthorsson saw his close-range effort well saved by Christian Abbiati before Viktor Fischer flashed a shot wide.
Abbiati was in action again in the 34th minute, tipping Lerin Duarte's free-kick over the crossbar, before watching on as Niklas Moisander blazed over following the resulting corner.
Milan had barely a sniff in the opening 45 minutes, but enjoyed the first sight of goal in the second half when Riccardo Montolivo saw his close-range effort pushed away by Jasper Cillessen, before Balotelli hit a free-kick into the wall from a good position.
At the other end Sigthorsson got on the end of a Siem De Jong cross, but his header did not have the power to worry Abbiati as he gathered comfortably.
Balotelli then launched a more menacing shot at goal but Cillessen was equal to it, a wonderful save pushing the ball to safety.
It was Balotelli again in the 85th minute but Cillessen once more made the block.
It seemed destined to finish goalless until Denswil nodded home, but Balotelli - who last week missed from the penalty spot in a 2-1 defeat to Napoli, subsequently getting sent off in the same match - earned a shot at redemption as Van der Hoorn was tempted into the foul, and he then placed his effort into the bottom left-hand corner of the net.
The result keeps AC Milan in second place in the group with four points, two behind Barcelona and three ahead of Ajax, with Celtic propping up the others.