The Argentine struck in the 23rd minute with a fine finish to a breakaway move to cancel out Robinho's ninth-minute opener.
The result puts Barcelona two points clear at the top of Group H.
Milan came racing out of the blocks, putting pressure on Barca's backline and a defensive error led to Robinho's goal.
The Brazilian beat the away side's dithering defenders to a high ball, and after exchanging passes with countryman Kaka, slid a simple finish past Victor Valdes.
Milan rarely looked troubled in the opening period, but then gave the ball away to Andres Iniesta. The Spain midfielder slipped in Messi on the right, who drilled low to level the scores.
The Catalans dominated the second half against a tired Milan, but despite a couple of good chances couldn't make the most of their possession and had to settle for a point.
Barcelona's coach Gerardo Martino said: "We created more goal chances and for this reason we deserved a victory. It's not easy to play with so many players spread across your opponents' midfield."
Milan coach Massimiliano Allegri said: "The lads played an excellent match. We gave little away but still created a few good chances. We were punished for a mistake."