Balotelli, who has been linked with a return to his native Italy all month, will join Milan on a four-and-a-half year deal, provided he passes a medical which is due to be held on Wednesday.
The 22-year-old, who joined City from AC's city rivals Inter in 2009, has courted plenty of controversy on and off the pitch during his time in the Premier League. He is expected to pass the medical and then his switch will be confirmed.
It is being reported that the transfer is worth just under £20m, plus bonuses and add-ons, with Milan finally paying what City wanted for the Italy international after holding out for a top fee.
The Premier League champions have yet to comment on the transfer but boss Roberto Mancini and coach David Platt had consistently said they thought Balotelli's exit this month was unlikely.
However, Gandini has tweeted: "Transfer agreement for Balotelli signed with Manchester City. Medical is tomorrow in Milan, then personal terms until 2017 will be signed."