Yaya Toure and Vincent Kompany gave City a 2-0 half-time lead, but Kieran Richardson and a bizarre Kompany own goal made it 2-2 after 70 minutes.
Substitutes Jesus Navas and James Milner then sealed the win for City, with two late goals five minutes apart.
"I thought that we had to change something," said Pellegrini regarding the substitutions.
"When we were winning 2-0 we were still playing well, but we still had a lot of fortune.
"When we were 2-2 I thought that I must change something because I thought we were not going to win the way we are playing.
"Our creative players were tired, so we have an added option.
"Milner gives another style of play but scored an important goal for the win."
The Chilean also hailed City's away form, something which was questioned at the start of the season after losses to Cardiff City and Aston Vila.
"There are a lot of reasons why you can win or you can lose away or at home," said Pellegrini.
"I think it is important for this team not to be overthinking that we cannot win away because we won two games in the Champions League, won two games in the Capital One Cup, and from the last three games we've won two and drawn one playing away.
"Maybe it's impossible to play exactly the same as we do at home, but I think that it's improving and that's why we are winning."
Looking ahead to hectic Christmas schedule which sees them play Liverpool at home on Boxing Day, Pellegrini said: "I think it's a massive game for both Liverpool and for us.
"We hope we can continue playing excitingly and scoring the same amount of goals that we are doing at home."