Rooney opened the scoring when he netted his 200th Premier League goal after 35 minutes.
The former Manchester United striker tucked home Dominic Calvert-Lewin's cross to reach the milestone against the team whom he also scored his 50th and 150th PL goals.
Man City had Kyle Walker sent off before half-time following two bookable offences, but rallied after the break.
A wave of pressure was finally rewarded with eight minutes to play when substitute Sterling met Mason Holgate's miscued clearance and volleyed past Jordan Pickford.
Everton's Morgan Schneiderlin became the second player to be sent off on 88 minutes, but it was too late for Man City to find a dramatic winner.