You could not script this drama and be taken seriously. Chasing a fourth title in five seasons, City knew victory would secure that, yet Steven Gerrard had Villa well organised and the hosts struggled to find their usual fluency.
Matty Cash's 37th-minute opener stunned the hosts, and former Liverpool forward Philippe Coutinho left City devastated when he lashed Villa two goals clear in the 69th minute.
But Ilkay Gundogan's header and Rodri's low strike dramatically hauled the hosts level with two goals in three minutes, before super-sub Gundogan slammed home City's third nine minutes from time, scotching Liverpool's title hopes.
It was shaping up from the early stages to be 90 minutes of City attack versus Villa defence and countering, with the hosts having had a shade under 75 per cent of possession in the first quarter. Phil Foden rolled a shot six inches wide, via a slight deflection, and Gabriel Jesus wasted a decent opening.
Villa found the breakthrough when its full-backs combined, Lucas Digne crossing from the left for Cash to head in from eight yards as Joao Cancelo failed to prevent the Poland international attacking the ball at the far post.
Ollie Watkins dithered as another great chance came Villa's way, John Stones dashing back to jostle the striker off the ball.
Jesus missed a glorious opportunity five minutes into the second half when he stabbed over from close range. The Brazilian had another shot charged down, while at the other end Watkins was denied by Ederson's sprawling save after brushing off Aymeric Laporte's challenge.
City was in deep trouble when Coutinho fired Villa two ahead in the 69th minute, fastening on to a flick-on from Watkins and rifling low into the left corner.
Gundogan gave the hosts hope when he headed fellow substitute Raheem Sterling's cross past Robin Olsen in the 76th minute, and then Rodri lashed in from the edge of the box.
Guardiola was leaping around on the touchline, the crowd anticipating a winner, just as when Sergio Aguero's late dramatics delivered the title in 2012, and it came when De Bruyne's delicious ball across goal from the right was met by Gundogan. He could hardly miss. City, from the depths of despair, is champion once more.