The first Liverpool goal came at the London Stadium in a swift counter-attack from a West Ham corner, Mane setting up Salah to score.
Some 157 seconds later, Joel Matip made it 2-0 from close range after a corner was not cleared.
Salah made sure of the points when he was set up again by Mane as Liverpool returned to sixth.
West Ham are a point and a place above the relegation zone.
West Ham: 19 Nov v Watford (A)
Liverpool: 18 Nov v Southampton (H)