City consolidated their top four hopes with an exciting 3-2 win.
Fernandinho struck in the 89th minute as City killed off a Villa comeback at the Etihad Stadium. City were not at their best but looked to have the game sewn up as they went 2-0 ahead with goals from Sergio Aguero - pouncing on a Brad Guzan blunder - and Aleksandar Kolarov.
Pellegrini said: "I don't think it was fortunate.
"We didn't play well and I think Aston Villa played very well, especially in possession of the ball, but they didn't have chances to score, just the two set-pieces (from which) they drew the game.
"So, I don't know why we are fortunate that we scored the third goal from a set-piece in the same way they scored their two goals.
"It is very important to continue with the spirit we had today. It is not easy when you are winning 2-0 and then they draw 2-2 to go again for the match. We did it.
"With this spirit, another game we don't lose."