The match was 1-1 at half-time when Leroy Sane's powerful shot cancelled out Alex Oxlade-Chamberlain's ninth-minute opener.
And the Reds looked to be heading for a convincing victory when three superb goals in nine minutes from Roberto Firmino, Sadio Mane and Mohamed Salah put the home side 4-1 ahead.
Late goals from Bernardo Silva and Ilkay Gundogan set up a thrilling finale but City could not grab the equaliser.
City's lead at the top is 15 points, which could be cut to 12 if Manchester United win on Monday night, while Liverpool move up to third place.
Liverpool: 22 Jan v Swansea City (A)
Man City: 20 Jan v Newcastle (H)