David Silva gave City the lead after 29 minutes, before Gabriel Jesus doubled their advantage from the penalty spot seven minutes later.
Shinji Okazaki’s wonderful volley halved the arrears and Leicester improved after the break – but City held on to move up to third in the Premier League table with two matches remaining.
Leicester complained that Sterling was stood in an offside position in the build-up to Silva’s opener but the winger says he didn’t involve himself in the play.
“It’s a massive win,” Sterling said. “There’s been times throughout the season when I felt we deserved more but didn’t get any luck. Today we got the luck.
“David shot and I realised if I touched it then it would be offside. I wasn’t worried because I knew I didn’t touch it.
Meanwhile, Yaya Toure says he was delighted to come away with all three points after a tough contest against last season’s Champions.
“It was difficult,” he said. “We controlled the game after the first goal and got the penalty.
“But when they scored it was quite difficult but at the end of the day we are delighted with the win.”
At 2-1, Leicester were awarded a penalty when Riyad Mahrez was tripped inside the box.
The Algerian scored the resulting spot kick, but it was ruled out after he was adjudged to have made contact with the ball twice.
Toure says it would have been very harsh on City, who were dominant for long periods, if they had failed to come away with all three points.
“I was right behind him and you could see him slip,” he said. “You are unlucky sometimes.
“I was delighted for us as I thought it would be harsh. To win the game was very important.”