Former City defender Boateng’s fierce shot took a slight deflection off Mario Gotze as it flew across Joe Hart after City failed to clear a corner.
Hart had earlier kept City in the match with a string of saves from Thomas Muller, Gotze and Boateng.
City’s best chance came in added time, but Sergio Aguero poked narrowly wide.
The visitors were also denied a potential penalty when Mehdi Benatia appeared to upend David Silva in the box.
But German champions Bayern controlled the majority of the match and could have been out of sight by half-time without Hart’s heroics.
With Group E rivals Roma kicking off their campaign with an impressive 5-1 thrashing of CSKA Moscow, City already look to be facing a difficult task to qualify for the knockout stages.
The Premier League champions, under pressure to deliver the Champions League success their owner Sheikh Mansour craves, reached the last 16 for the first time last year when they finished runners-up to Bayern before being knocked out by Barcelona.
City, with manager Manuel Pellegrini watching from the stands because of a touchline ban, were reminded of the scale of their task inside the first minute as five-time European Cup winners Bayern sliced them apart with ease.
Robert Lewandowski’s flick freed Muller, who lost his balance under pressure from Bacary Sagna as he rounded Hart and could only find the side netting.
Muller came even closer to scoring in the 19th minute when his header from a Juan Bernat left-wing cross was tipped over the bar one-handed by Hart.
The City keeper was pressed into action once again to deny Gotze after a low cross from the opposite flank, and David Alaba drew another save from Hart with a fierce shot from the edge of the box.
City preferred Edin Dzeko to Aguero as their lone striker and he served notice of the visitors’ threat by bending a shot just past the post before Sagna forced Manuel Neuer into saving his header following a corner.
Bayern still posed the greater menace and another chance went begging as Lewandowski latched on to Alaba’s pass but went too wide to beat Hart.
With Yaya Toure looking short of full fitness, Bayern were able to dominate midfield and Hart was at full stretch once again to keep out Gotze’s deflected effort in the second half.
And when Rafinha stung Hart’s palms with a long-range effort, Muller was ruled offside as he looked to pounce on the follow-up.
With time running out, Hart tipped Boateng’s shot around the post, but he could do nothing to keep out the World Cup winner’s next effort.
Gathering a bouncing ball at the far post, Boateng – who spent the 2010-11 season at City before he was sold to Bayern – fired in a shot that brushed off Gotze’s back and flew into the far top corner.
As the Bayern fans celebrated, City almost fashioned an equaliser when Aguero outsprinted his fellow substitute Dante, but he could not direct his shot on target.