Arsenal took an early lead through Theo Walcott, but just as in Tuesday’s 2-1 defeat at Everton, they wilted in the second half as Pep Guardiola’s City stormed back at the Etihad Stadium.
Leroy Sane equalised two minutes into the second period before Sterling netted a 71st-minute winner, lifting City above Arsenal into second place, seven points adrift of leaders Chelsea.
Arsenal slipped to fourth, below Liverpool on goal difference, and will be cast further adrift of the leading pack if Jurgen Klopp’s men win at Everton in Monday’s Merseyside derby.
Following recent heavy losses to Chelsea and Leicester City, it gave City a first win over a fellow top-six club since their 2-1 success at Manchester United in early September.
Having gone 14 league games unbeaten, Arsenal have now lost successive matches.
With Chelsea nine points above them, manager Arsene Wenger will once again face questions about his ability to end the club’s 12-year league title drought.
City’s players walked out wearing shirts bearing the name of team-mate Ilkay Gundogan, who is set to miss the rest of the season after sustaining knee ligament damage in Wednesday’s 2-0 win over Watford.
The early evidence suggested their minds were indeed elsewhere as Arsenal took the lead inside five minutes.
An attack prompted by right-back Hector Bellerin culminated in Alexis Sanchez sliding a pass behind Nicolas Otamendi’s back to Walcott, who gathered the ball and slipped a low shot past Claudio Bravo.
Guardiola again left close-season signing John Stones on the bench, but even with a four-man defence, his side looked porous.
Walcott, granted acres of space inside the City box, volleyed over the bar and then came within a whisker of doubling Arsenal’s lead by heading wide from Nacho Monreal’s cross.
Sterling, deployed as a lone striker by Guardiola, came close to instantly cancelling out Walcott’s goal when, stretching to meet Kevin De Bruyne’s cross, he could only head wide from six yards.
But it was not until Yaya Toure met De Bruyne’s corner with a header in first-half stoppage time that visiting goalkeeper Petr Cech had an effort to save.
Guardiola swapped right-backs at half-time, Bacary Sagna coming on for Pablo Zabaleta, but the key change saw De Bruyne move up front, with Sterling switching to the right wing.
City’s wingers were at the start and conclusion of their equaliser, Sterling’s inward dart enabling David Silva to loft a pass over the Arsenal defence for Sane to stroke home his first City goal.
Suddenly it was City strolling past their opponents at will.
De Bruyne released Sane, obliging Cech to charge out and save at his near post, Sterling drilled wide from 25 yards and De Bruyne saw a skidding left-footer palmed behind by Cech.
City took the lead a minute later, De Bruyne catapulting a 50-yard wide to Sterling, who cut inside Monreal and lashed a left-foot shot into the bottom-right corner.
De Bruyne came close to adding a third when he directed substitute Jesus Navas’s cross against the post.
Arsenal’s woe was compounded when midfielder Alex Oxlade-Chamberlain, a reported City target, was forced off by injury just 13 minutes after coming on in place of Alex Iwobi.