City took a 14th-minute lead through Fernandinho before being pegged back by a Wilfried Bony header on the stroke of half-time - a goal Pellegrini believes should have been ruled out for offside.
The title hopefuls refused to let that setback affect them though and second-half strikes from Yaya Toure and Aleksandar Kolarov saw them leading 3-1 heading into the final 24 minutes.
Swansea managed to pull another goal back through Bony in stoppage time but City held on for the points which provisionally lifts them clear at the top of the Barclays Premier League standings.
A happy Pellegrini felt his side deserved the win and that the scoreline flattered Swansea slightly, telling Sky Sports: "It was a very good result because Swansea are a strong team here at home and also away. I think the way we won today is very important for us.
"We had a very good first half. The goal at the end of the first half was offside and they grew with that goal, but the team at the start of the second half continued trying to score the second goal.
"We scored the second and the third and it was a pity they got the last goal because 3-2 was not the difference between the two teams, whilst repeating that we were playing against a very good team."
Swansea manager Michael Laudrup was also pleased with his side's first-half showing but was disappointed with the defending for City's "soft" third goal, which he felt was the decisive incident of the match.
He said: "I think the first half (we were) excellent, we came back and had more chances than Man City and then they got the second goal via a deflection off Ashley (Williams).
"Of course conceding three goals to a top team like City it's difficult to win."
He added: "I think the third goal really hurt us because we tried to come back, we had a chance and then they scored the third one.
"It looked quite soft to me, we missed the ball there and we could have done much more for that goal in different parts of the pitch. So it was really uphill after that.
"We got a second goal but it was too late."