But Shelvey curled home a brilliant 87th-minute equaliser which, coupled with Martin Dubravka’s stoppage-time save from Sterling, ensured the game finished level.
City, who started the day nine points behind Liverpool, dominated possession throughout but could not turn the pressure into enough goals to atone for their defensive fragility in front of a crowd of 49,937 at St James’ Park.
But they were unable to prise their way through and it was the Magpies who mounted the first attack of note when Shelvey picked out Allan Saint-Maximin down the left and he cut inside to scuff a seventh-minute shot straight at goalkeeper Ederson.
Fernandinho headed over from a De Bruyne corner, but the home side responded with Shelvey curling a 20th-minute free-kick just wide after Saint-Maximin had been fouled by De Bruyne.
However, it was City who took the lead two minutes later when David Silva back-heeled the ball into the path of Sterling after it had ricocheted back to him from Isaac Hayden’s challenge and the England forward blasted home from close range.
Newcastle were level within three minutes when Willems – whose only other Newcastle goal came against Liverpool – played a one-two with Miguel Almiron before thumping a low right-foot drive past Ederson. It was the Paraguay international’s first assist since his £21million arrival in January.
Dubravka needed two attempts to claim Sterling’s rising 33rd-minute strike and was relieved to see De Bruyne’s stoppage-time effort deflected into his waiting arms as the Magpies made it to the break on level terms.
Federico Fernandez’s barnstorming run from his own penalty area sparked a rare Newcastle counter-attack which saw Shelvey send a 54th-minute free-kick just wide after Fernandinho had barged Joelinton to the ground 30 yards out.
Javier Manquillo had to produce a last-ditch tackle to deny Gabriel Jesus after De Bruyne and Sterling had picked a path through in the 65th minute, and Dubravka had to turn away a dangerous De Bruyne cross seconds later.
The Slovakia international pulled off a fine 68th-minute double save to deny Jesus and De Bruyne and saw substitute Bernardo Silva drag a left-foot shot wide four minutes later with the pressure mounting.
However, he was powerless to resist when De Bruyne pounced after Mendy’s cross had been half-cleared, chesting the ball down before firing home off the underside of the crossbar.
But there was to be a further twist when, with three minutes remaining, substitute Christian Atsu played a free-kick square to Shelvey, who sent a sumptuous curling effort beyond Ederson’s despairing dive to snatch a point.