With the title secured a week ago, there was little at stake for Jurgen Klopp's Liverpool side who showed far from their usual levels of intensity but the loss, just their second of the league campaign, was an emphatic reminder that City will be desperate to regain their crown next season.
Klopp was quick to defend his team's attitude, rejecting any suggestion they had taken the game lightly.
"I saw a brilliant attitude. I saw fight. We didn't behave like somebody who became champions a week ago. We lacked fluidity. And in some 50-50 situations they were quicker than us," he said.
"Man City are incredible. I saw their season, they didn't play a bad game even when they lost," he said.
Salah then struck the post after a clever pass from Roberto Firmino, whose hair was coloured red, but if Liverpool thought they were in for another night of festivities, they were in for a rude awakening.
Sterling doubled the lead 10 minutes later when after a swift break, Phil Foden found him inside the box and the ex-Liverpool forward cut inside Gomez and slid the ball home.
The 20-year-old Foden made it 3-0, firing past Alisson after a swift exchange with Kevin De Bruyne.
City were showing an unusual willingness to play long balls and after Rodri launched a pass deep to De Bruyne, the Belgian found Sterling inside the box and he slipped the ball goalwards, with substitute Alex Oxlade-Chamberlain's outstretched touch only turning it into his own net.
It could have been even worse for Liverpool with Riyad Mahrez's fine solo effort in the final moments but VAR spotted a handball by Foden in the build-up.
The loss was the joint-heaviest defeat by a side already crowned Premier League champions. Arsenal were beaten 4-0 at Liverpool in 1997-98 in the game after they clinched the title.