The Blues moved briefly to the top of the Premier League table with a narrow victory at the Liberty Stadium on New Year's Day.
City have endured their struggles on the road this season, but were able to control proceedings for long periods in South Wales.
Fernandinho netted the first goal of 2014 to put them in front, and Yaya Toure and Aleksandar Kolarov had them 3-1 to the good midway through the second half.
A spectacular late strike from Wilfried Bony, who grabbed both of Swansea's goals, got the home side close, but Pellegrini feels the visitors got what they deserved.
The Chilean tactician told Sky Sports: "It's a very good result.
"Swansea are a strong team here, at home. Wherever they play they are a very strong team, so to win today is very important for us.
"I think that we had a very good first half - in control of the ball against a team that's very good in keeping possession.
"The goal at the end of the first half was offside. They drew level with that goal but at the beginning of the second half we continued trying to score the second goal.
"We scored the second and the third and it was a pity that they scored the last goal because I don't think 3-2 was the difference between the two teams. But we beat a good team today."