The striker fired home a late free kick - his second goal of the match - after Luca Siligardi and Paulinho had put the home side in front
The former Manchester City man opened the scoring after just seven minutes, but goals from Luca Siligardi and Paulinho had put the home side in control for much of the second half.
However, Balotelli sealed an important point for Massimiliano Allegri's outfit with a thunderous drive from distance in the final 10 minutes.
Milan remain eighth after the draw, while the hosts stay on the edge of the bottom three.
Livorno coach Davide Nicola, himself under fire following a slump in fortunes, made four changes to his side after three consecutive defeats with Andrea Coda, Andrea Luci, Joseph Duncan and Ibrahima Mbaye all returning to the starting line-up.
Philippe Mexes and Cristian Zapata both came into the heart of defence for Milan, while 21-year-old Gabriel continued in goal.
Buoyed by back-to-back wins over Celtic and Catania, Milan made the perfect start to open the scoring after seven minutes through Balotelli after neat work from strike partner Kaka.
The Brazilian fired a low cross in from the left and the striker bundled home his fifth league goal of the season after Francesco Bardi had failed to collect.
Livorno withstood more Milan pressure and levelled through Siligardi with their first shot on target.
The striker got the ball onto his left foot, drifted past the challenge of Nigel de Jong and curled his shot beyond the outstretched arm of Gabriel.
A scruffy start to the second half saw Livorno enjoy the better opportunities and Duncan went closest to giving them the lead in the 53rd minute with a fierce left-footed drive that Gabriel held.
Paulinho made Balotelli pay for a wasted opportunity as he put Livorno ahead in the 58th minute. The Brazilian striker latched onto a through-ball from Siligardi and fired low past Gabriel at his near post.
With time running out, Milan needed something special to get them back in the game - and Balotelli was the man to provide it.
The Italy international – ploughing a lone furrow - was fouled 30 yards from goal and lifted himself up to fire an unstoppable free-kick past Bardi.
He almost stole the points with another stunning drive from fully 35 yards out, but the ball smashed against the underside of the bar and bounced to safety, meaning both sides were forced to settle for a share of the spoils.