Cheikhou Kouyate admitted his matchwinner against Swansea was his most important goal for West Ham.
The Senegal midfielder lashed a powerful drive past goalkeeper Lukasz Fabianski moments before half-time to secure a vital 1-0 win.
The Hammers had lost their previous five matches and were in danger of being dragged into the relegation battle.
But Kouyate's strike lifted them eight points clear of the drop zone and eased some of the pressure on manager Slaven Bilic.