The Hammers opened the scoring in the ninth minute thanks to Andy Carroll's header, and their advantage was doubled when Mohamed Diame beat Vito Mannone with a deflected effort in the early stages of the second half.
A dramatic finish was set up when Adam Johnson curled in a shot in the 65th minute, but Sunderland failed to add to their tally late on as West Ham held on for the win.
Below, Sports Mole takes a closer look at the match.
On target: 7
On target: 6
Was the result fair?
For long stages of the match, it was difficult to see anything other than a West Ham win happening at the Stadium of Light. However, a fightback from Sunderland made things interesting as they searched for a positive result on a crucial night. Their pressure would probably have earned a draw on another day, and they can perhaps feel unlucky not to have claimed something from the game.
The Black Cats needed to step up, but they were very poor in all areas during the fist half. In defence, they allowed Carroll to dominate throughout, and they were short of ideas in attack. Gus Poyet's side improved when Johnson was introduced, but a lack of creativity in the final third of the pitch proved to be costly as they struggled to turn pressure into clear chances.
West Ham's performance
Sam Allardyce's men approached the match with a clear gameplan as they happily invited pressure before attempting to launch counter-attacks at pace, with Stewart Downing at the heart of most things as he linked impressively with the dominant Carroll. Winston Reid and James Tomkins were barely troubled in defence until they conceded, but their calmness was a key factor in the victory. Overall, it was a great away performance from the Hammers.
Sports Mole's man of the match
Andy Carroll: Downing could have easily picked up this award tonight, but it was Carroll who played the most important role for the visitors. The England international held the ball up impressively, and was more than happy to run into the channels to chase down longer balls. A trademark headed goal capped off an excellent display.
Lee Cattermole had a great opportunity to equalise for Sunderland just three minutes after they fell behind, but the midfielder lacked composure while in plenty of space as he struck a weak effort straight at Adrian from close range.
Howard Webb will not be a popular man in Sunderland. The hosts should have been awarded a penalty late in the first half when Kevin Nolan appeared to use his elbow to taken the ball away from John O'Shea. It looked like the referee had a clear view, so there was no excuse for not pointing to the spot.
Sunderland: Poyet's side return to action next Monday against Tottenham Hotspur at White Hart Lane.
West Ham: The Hammers face a tricky trip to Anfield to face title chasers Liverpool on Sunday.