The Egyptian curled home the opener and then rounded off a sublime counterattack before Gini Wijnaldum made the score safe.
But which players stood out most?
✔️ GOOD PERFORMANCE
Gini Wijnaldum: 7.9
The Dutchman remains one of Liverpool's most underrated players and here he was much more than the goal that rounded off the win.
He muscled his way into the area to seal the win but he also won 3/4 duels and made eight recoveries as he ensured Liverpool retained possession as often as possible.
His contract situation in the summer still remains unclear and Liverpool may make sure they give him what he needs.
❌ BAD PERFORMANCE
Angelo Ogbonna: 5.6
The veteran defender did well in the first half against Liverpool's makeshift front three, but in the second the Reds' class shone through.
Ogbonna was left trailing on the counter for Salah's clinical second and allowed Wijnaldum across him for the third. West Ham needed a solid defensive display to get anything here and unfortunately, in the second half at least, they couldn't provide it.
⭐ STAR MAN
Mo Salah: 8.7
Salah had been on a barren Premier League run but ended that in spectacular style, netting two superb goals.
His first was an excellent curler from just inside the box, using Aaron Cresswell's body to bend the ball around him and into the far corner.
But the second was something else altogether. A sweeping counterattack saw Shaqiri whip a ball onto the toe of Salah and he took a sublime first touch before lifting his shot over the diving Fabianski and into the net.
Make no mistake - this was a tight game, and one that Salah ensured went in his side's favour.