Goals from David Silva and Yaya Toure in either half gave City the win they needed but Napoli's 2-0 success at Villarreal helped the Italian club progress alongside Group A winners Bayern.
Despite notching what is often seen as the magic 10 points that usually takes teams through, City finished third in what manager Roberto Mancini called the "worst group" and will now go into the second tier Europa League.
"I think that usually with 10 points all the teams go through always, 99 percent," Mancini told a news conference.
"But in this group it was not enough, Napoli got one point more than us and they deserved to go through. We made some mistakes but normally with 10 points you can go through."
The mistakes were not in this contest at the Etihad Stadium, where City displayed the kind of attacking sparkle that has seen them tear through teams at will in the Premier League, but were made in previous games - namely against Napoli.
They drew 1-1 at home to the Italians in their group opener and lost 2-1 away from home despite dominating for long spells in both games, with Mancini saying the second game had "probably" been the one that had cost them qualification.
Bayern finish with 13 points from their six group games, with Napoli on 11, City on 10 and Villarreal on 0.
Knowing that only a win against the German side would give City any chance at all, Mancini showed his intent by naming Samir Nasri, David Silva, Sergio Aguero and Edin Dzeko in the starting line-up and the quartet were involved in nearly every move forward.
The hosts had the ball in the back of the net in the 15th minute when Silva's free-kick was headed in by Joleon Lescott but it was disallowed for a foul by the defender on Bayern keeper Joerg Butt.
Unperturbed, City continued to push forward with Dzeko heading wide a few minutes before he set up Silva with a neat flick nine minutes before the break.
They started the second half as they ended the first, doubling the score in the 52nd minute when Aguero played the ball through to Dzeko who had spotted Toure's perfectly timed run and the charging Ivorian slotted it past Butt.
Bayern, who named a team containing just three survivors from the one that started against City in their 2-0 win over the English club in Germany in September, lacked a cutting edge and aside from a couple of long-range shots offered little in reply.
City fans groaned and the seats emptied as news of the goals in Spain filtered through.
For some, the blow was softened slightly by the fact neighbours and rivals Manchester United had suffered the same fate after losing 2-1 at FC Basel while others will have noted Mancini's vow to take the other European competition seriously.
"For Manchester City it's an important trophy because we need to win more trophies," said the manager, who guided City to thei
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.