Arsenal are now four points behind league leaders Liverpool
Julien Faubert's own goal set up a win for Arsenal to keep them in touch with leaders Liverpool as West Ham slipped to a third successive league defeat.
Theo Walcott and Robin van Persie both hit the post before substitute Emmanuel Adebayor's scuffed shot was directed beyond Robert Green via Faubert.
In injury time, Adebayor ran from the centre circle to finish off a delightful Nicklas Bendtner pass.
West Ham striker Carlton Cole was then sent off for a foul on Alex Song.
It was a pulsating end to a match which seemed to be heading towards a goalless draw, with West Ham's defence and the impressive Green frustrating the visitors.
It was the introduction of the direct running of Adebayor in the 65th minute which changed the game and ensured the Gunners, now four points behind league leaders Liverpool, remain in title contention.
Zola finds Hammers' defeat hard to take
For West Ham boss Gianfranco Zola, who presided over two wins in his first two league games in charge, the honeymoon is over but he can take heart from his side's battling display.
The match burst into life with a coruscating Walcott run in the 20th minute.
The England forward set off near the half-way line and beat two defenders only for the crossbar to thwart what would have been a magnificent goal, although some would argue he should have passed to his team-mates waiting in the box.
Walcott had another chance five minutes later when a delightful Cesc Fabregas chip found Van Persie, who put Walcott through only for the teenager to be denied by Green's instinctive save.
But the best chance of the half arguably fell to West Ham striker Craig Bellamy who would have scored with a low strike into the corner had it not been for Manuel Almunia's protruding left foot.
Wenger happy with hard-fought win
Arsenal were susceptible to the West Ham counter-attack, with Bellamy's pace in particular posing problems, but it was the Gunners who were the more threatening.
In the second half, Van Persie's 25-yard strike tested Green and the striker rattled the post with a venomous free-kick before Faubert's error gave Arsenal the advantage.
Adebayor got the goal his cameo deserved when the visitors broke free with Bendtner putting his strike-partner through with a pass from deep inside his own half.
West Ham's woe was then compounded when striker Cole was harshly shown a straight red in the dying seconds for a sliding tackle on Song.
Arsenal manager Arsene Wenger:
"It was a big win for us. To come out of it with a frustrating 0-0 would have felt like a wasted opportunity to get closer to the top.
"We knew before the game we could not drop points. West Ham can also feel frustrated because they defended well and gave everything."
On goalscoring substitute Emmanuel Adebayor, Wenger added: "Last year I over-used him and now we go into a period where we play every three days, which is why I want to rotate a little bit."
West Ham manager Gianfranco Zola:
"I know it might look crazy, but I am not worried at all because we are going to get through this.
"It would be easy for me to have a go at them, but the players' commitment is fantastic and their attitude is perfect."
On Cole's sending off, Zola added: "I was not happy about the tackle, but I do not think it was a straight red card, maybe a yellow would have been better."
West Ham: Green, Faubert, Collins, Upson, Ilunga, Mullins, Parker (Boa Morte 77), Bowyer (Sears 89), Di Michele (Etherington 78), Bellamy, Cole.
Subs Not Used: Lastuvka, Lopez, Davenport, Collison.
Sent Off: Cole (90).
Booked: Parker, Faubert.
Arsenal: Almunia, Eboue, Gallas, Silvestre, Clichy, Walcott (Adebayor 67), Fabregas, Song Billong, Nasri (Diaby 68), Bendtner, Van Persie (Sagna 90).
Subs Not Used: Fabianski, Toure, Ramsey, Djourou.
Booked: Fabregas, Clichy, Song Billong.
Goals: Faubert 75 og, Adebayor 90.
Ref: Phil Dowd (Staffordshire).
BBC Sport Player Rater man of the match: Arsenal's Emmanuel Adebayor 8.16 (on 90 minutes).
Please note that you can still give the players marks out of 10 on BBC Sport's Player Rater after the match has finished.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.