City fell 2-0 behind in a calamitous opening 12 minutes at the Allianz Arena but came storming back to win thanks to goals from David Silva, Aleksandar Kolarov and James Milner.
The result was not enough to seal top spot in Group D for City, who had already guaranteed their progress to the last 16, but it was sweet revenge for a 3-1 defeat by Bayern at the Etihad Stadium earlier in the campaign.
Pellegrini was delighted that City were able to show their quality and also paid tribute to the strength of his squad, having made seven changes to his starting line-up ahead of their Premier League clash with Arsenal on Saturday.
He told Sky Sports: "It was a very important game. First of all because we wanted revenge for what we did in Manchester - we played very badly that day.
"There is not that difference between Bayern and our team.
"So, today, winning here and scoring three goals without Kompany, Aguero, Yaya Toure, Nasri, I think that shows we have a very good squad, so it is an important victory."
Asked if he had been regretting his team selection after 12 minutes, Pellegrini added: "I have some doubts about the goals for Bayern Munich. I think one of them is coming back from an offside position.
"We didn't play in the first 15 minutes but when we started keeping the ball like we know how to, I think we played the same as Bayern."
City would have finished top of the group with a 4-2 win but Pellegrini resisted the temptation to summon Aguero from the substitutes' bench in the second half.
Alvaro Negredo did come on in the 73rd minute as Silva was withdrawn on his first appearance back from injury, but Pellegrini then decided to replace striker Edin Dzeko with midfielder Jack Rodwell two minutes from time.
And the manager appeared to suggest he did not realise City needed only a further goal to go through as group winners - and avoid the likes of Real Madrid and Paris St Germain - when asked why Aguero was not used.
The Chilean said: "I was tempted if we scored the fourth goal. Of course, that's why I sent Aguero to warm up.
"But also I think it was a risk to continue with Silva. He couldn't play more than 70 minutes.
"It is very important to be first in the group but not the most important thing. It was difficult to score two goals and I think that Silva couldn't play more than 70 minutes."
Pellegrini believes City are still a work in progress, having had some poor results away from home domestically this season, but hopes the win over Bayern will provide a springboard to better things this season.
He said: "I hope so. You cannot change everything from one game to another. I know we haven't had good results in the Premier League playing away but we didn't play badly in most of them, so we must continue trying to find a style of play and this match will be very important for us."
Seems like the mother of all f&£kups this morning. Great result. Not exactly great diligence on Pellegrini's behalf. I don't believe for a second it's all Pellegrini's fault. There's a whole staff and squad to know that.. Anyways a great result, delighted with the fight and spirit in the camp. After 25 minutes we were in control. We were Neuer's shin pad away from arguably one of the best CL victories ever.. City obviously weren't the only ones unsure of what score meant what, 2 minutes injury time? Has that ever been seen in a still competitive game?- invisible man