Roberto Firmino looked to have sealed a potentially vital point for leaders Liverpool in the title race when he equalised just past the hour, but Sane struck soon after, confirming the Reds' first league defeat of the season in their 21st game and moving City to second and within four points of the summit.
Liverpool were mightily unlucky not to take an early lead when a defensive mix-up between John Stones and Ederson followed Sadio Mane hitting the post, but they survived and finished the first half well – Sergio Aguero netting in ruthless fashion.
Firmino restored parity in the 64th minute and City initially looked rattled, as if they could see the Premier League trophy moving out of sight, until Sane found the bottom-right corner to breathe life into their challenge once again.
A lively City start faded and they had a lucky escape in the 17th minute. Mohamed Salah released Mane into the box and the Senegal forward hit the post before Stones blasted his clearance against Ederson and hastily scrambled to clear off the line.
Vincent Kompany was fortunate to avoid being sent off for a wild lunge on Salah 14 minutes later and City capitalised on that let-off just before the break.
Bernardo Silva played a low cross from the left towards the near post, where Aguero nipped in front of Dejan Lovren and emphatically smashed past Alisson from a seemingly impossible angle.
Liverpool hit back 26 minutes from time, however, as Andrew Robertson latched on to a lofted pass and played a volleyed cross for Firmino to bury with a stooping header.
But City were not done.
They caught Liverpool on the break and Sane found the net via the right post after being played into the box by Raheem Sterling.
A Liverpool onslaught followed, with Ederson tipping a Salah effort wide, before Bernardo Silva and Sterling missed glorious chances to finish the Reds off – luckily for them, no fightback came and the champions held on.
Aguero vital on the big occasion…again
It is difficult to be surprised by Aguero these days, given how impressive he has been at this level for so many years, but his goal on Thursday was his 37th against the 'big six' in the Premier League since 2011-12. Harry Kane is closest to him with 21 goals. There really is no one else like him in England in terms of effectiveness in the big games. The win also gives City much-needed momentum and halts the relentless charge of Liverpool, who would have gone nine points clear of Tottenham and 10 ahead of City with a win.
Sane the spark to reignite City's hopes
While his goal was undoubtedly a highlight, for its quality and importance, Sane also deserves praise for his general performance as he was a constant outlet on the left and caused Trent Alexander-Arnold plenty of issues.
Lovren targeted
It was plain to see for much of the match that Lovren was identified by City as Liverpool's weak link. He picked up an early yellow card and was then caught on his heels by Aguero for his goal. In a game of this magnitude, there is not much coming back from that.