The result means Southampton stay a point ahead of City in fourth but the Etihad club have a game in hand.
Sterling's 16th minute shot came after some lovely work up play by his City teammates.
Ederson kicked a long ball down the pitch which was picked up by Bernardo Silva who exchanged passes with Kevin De Bruyne until he slipped a ball into Sterling in the box who hit it with his first touch.
"It was a tough game, they've been doing really well in recent weeks. The message today was to show passion. Show aggression and I think we've done that," Sterling said after the game.
"You've got to concede as few as possible. We've done that, we've just got to score a few more at the other end."
Southampton were the better side for the rest of the half but failed to convert any of their chances into goals.
However, both referee Mike Dean and VAR judged there to be no foul play.
Both sides threatened in the second half with one of the best chances falling to Ilkay Gundogan on 78 minutes. Alex McCarthy did just enough to get his fingertips to the ball to flick the 20 yard shot over the bar.