Salah had gone six Premier League matches without a goal, equalling his longest goal drought for the Reds.
But there was to be no seventh successive blank as Salah returned to form with two exquisite second-half finishes in a valuable win at the London Stadium.
Salah made the breakthrough in the 57th minute after substitute Curtis Jones found him lurking on the right of the area.
The Egyptian striker wrapped his left foot around the ball, sending it looping over Hammers goalkeeper Lukasz Fabianski and curling into the back of the net.
Eleven minutes later Liverpool, and Salah, struck again with a lightning counter from a West Ham corner.
Reds boss Klopp said: “He scored against Tottenham but it was disallowed, but it was a good sign for him that a couple of things are clicking.
“Tonight he played a super game, his passing was good and the controlling of the game was good.
“The first goal is a super smart goal. I think Fabianski couldn’t see the ball, it was crowded and he just lifted it.
“The second goal, what a counter-attack! Two passes until Mo got the ball, first touch world class and a nice finish. Top game and top goals.”
It was West Ham who possessed the in-form striker going into the match and Michail Antonio must have been relishing the prospect of running at Liverpool’s latest makeshift defensive pairing of Jordan Henderson and Nat Phillips.
But Antonio spurned a glorious chance to make it three goals in four games, curling the ball inches wide moments before Salah struck.
Georginio Wijnaldum added a third for the champions before Craig Dawson’s late consolation.
A win would have taken West Ham above Liverpool into fourth, but they found out they have a long way to go before they can seriously think about breaking into the top four.
Boss David Moyes said: “I thought we competed as well as we could, but we didn’t play as well as we could. We tried to compete but they were just too strong for us today.
“Liverpool are not one of the teams we are challenging. Their consistency will be much greater. They played better than us so we’ve got no complaints.
“We came into the game confident, feeling we had a chance to get something but Liverpool made it difficult and we didn’t do the things we’ve been doing well.”