After Sergio Aguero had put City in front with a penalty following the dismissal of Bayern defender Mehdi Benatia who brought him down, the German champions scored twice in five minutes through Xabi Alonso and Robert Lewandowski.
But in the wake of Pellegrini's words of wisdom, Argentine Aguero scored two goals in the final five minutes of the match to complete a hat-trick and reignite City's hopes of progressing to the knockout stage with a 3-2 win at the Etihad stadium.
"My first thought at halftime was that we conceded two unbelievable goals and when you do that, it is very difficult to win," Pellegrini told reporters. "But I told the players we had 45 minutes to score two goals, otherwise we were out.
"I said it was our last chance to stay in the Champions League and I told them not to allow their spirit to fall down.
"Another team may do that, but this team never does that. It is never beaten and it always does its all to win."
"That is why the second half has double merit, because we beat Bayern Munich who played very well, but also because we did not fall down in this period.
"I don't think this team are ever beaten."
City are level on five points with CSKA Moscow and AS Roma in Group E, and if they win in Rome on Dec. 10 and the Russians fail to beat Bayern, the Premier League champions will qualify for the last 16.
"I can assure you that this kind of victory gives a lot of trust to the whole squad, so it was very important at this moment to do it," Pellegrini said.
"We will see what happens in the next round. I said last week if we have a mathematical chance to qualify then we will fight to the end and that is what we have been doing so far.
"It is important for us to do our duty and then we will see what happens in the other game."