The away side got off to the best possible start when Alvaro Negredo gave them the lead after only three minutes.
The striker was left unmarked in the box and had the simple task of nodding the ball past Jussi Jaaskelainen in the home goal.
Despite going a goal down so early in the match, the Hammers fought back well. Mohamed Diame battled his way down the right before hanging the ball in the air. Andy Carroll attacked it, but his header went over.
Jaaskelainen was then called into action, tipping away a Sergio Aguero effort.
The striker did manage to find the net a few minutes later, however. Marcos Lopes did well, beating a number of tackles before sending in a cross. A couple of West Ham defenders tried to close down Aguero but failed, allowing him to dink the ball over the goalkeeper.