Bayern looked likely to have to settle for a point from their Group E opener against the Premier League champions at the Allianz Arena on Wednesday after Joe Hart made a string of fine saves to frustrate them.
England goalkeeper Hart was finally beaten after 89 minutes, though, when defender Boateng secure all three points against his former club with a venomous right-foot strike that deflected in off Mario Gotze.
Boateng endured a frustrating season at City before returning to his homeland to join the Bavarian giants two years ago and the Germany international made no secret of his delight after consigning his ex-employers to defeat.
He said: "We had so many chances to score, but we wasted all of them until the last minute.
"The ball came absolutely perfectly to me and I thought to myself, this one I will hit into the roof of the net and that's what I did.
"It was pure joy for me, but it was hard work. We wanted to win this match and we did it."
Bayern have not been at their best at the start of the season, but Arjen Robben, who came on as a late substitute on Wednesday after recovering from a knee injury, took encouragement from their display against Manuel Pellegrini's side.
"It is very positive that we have created so many chances. We are on the right track," said the Dutchman.