The Reds put their recent struggles behind them and ended Manchester City's perfect start to the season with a hard-fought victory at home.
The goals of Erling Haaland gave City a boost and they were in top shape when they were beaten by the Reds.
For the first time in his career, Haaland was not on the score sheet and it was the Reds talisman who made the difference, racing on to a clearance from Alisson after Joao Cancelo's slip to beat Ederson with a composed finish.
A Phil Foden goal that would have put his side ahead was ruled out by the video assistant referee for Haaland's foul on Fabinho, despite the fact that Ederson had produced a brilliant save.
This was not to be Haaland's day, although he did bring two saves from Alisson, but Anfield was left happy as they finally showed why they have been City's main threat.
When temperatures cool, he will be overjoyed by a statement win, but when tempers boiled over, he was sent off for protesting.