City put pressure on Liverpool despite Fernandinho, who missed December's loss to the Eagles, being absent with an injury that may rule him out of next week's Champions League quarter-final second leg against Tottenham.
City led in the 15th minute when Sterling found the top corner and he seemingly made sure of all three points after the interval by converting Leroy Sane's driven cross, although Sergio Aguero going off with an apparent injury will have concerned Pep Guardiola.
And the City boss was further frustrated as his side lost their clean sheet to Luka Milivojevic's 81st-minute free-kick, although the defending champion was still able to close out another victory at Selhurst Park thanks to Gabriel Jesus' precise finish.
Sterling wasted a golden opportunity to put City in front in the 10th minute, somehow missing from close range after being brilliantly set up by David Silva.
But the England forward was soon celebrating his 20th club goal of the season in all competitions, racing on to a perfect pass from the recalled Kevin De Bruyne to lift a fine finish into Vicente Guaita's top-left corner, with the goalkeeper's positioning questionable.
Guaita saved from De Bruyne after Ilkay Gundogan's chip into the Palace box caused chaos and Benjamin Mendy fired straight at the goalkeeper before the interval.
Palace was holding on admirably, but City unlocked the door again in the 63rd minute. Silva and Aguero combined on the left to free Sane and when he fired the ball across the box, Sterling turned it in at the back post despite a slightly scruffy contact.
Aguero's substitution, the striker going down the tunnel after being replaced Jesus, could affect City's chances of clinching a historic quadruple and they had to endure a nervy few minutes after Palace captain Milivojevic exploited a huge hole in the wall to beat Ederson.
But Jesus ended any hopes of a Palace fightback at the death, De Bruyne leading a clinical counter-attack to set the Brazil striker up to beat Guaita at his near post, although the offside flag should have been raised.