Goals from Gabriel Martinelli, Nicolas Pepe and Pierre-Emerick Aubameyang inspired a remarkable comeback to give Freddie Ljunberg his first win as interim manager.
West Ham looked set to end a run of four winless home games up until the 60th minute, however the Hammers capitulated to heap more pressure on manager Manuel Pellegrini.
Story of the match
Arsenal dominated possession throughout the opening five minutes, however the first chance of the game fell to the hosts, Michail Antonio firing over from inside the area following good work from Felipe Anderson.
Despite an early scare the visitors continued to keep possession, moving the ball well from side to side but unable to threaten during the opening stages.
West Ham went close on the 25 minute-mark, Pablo Fornals’ strike from close-range saved by Bernd Leno after Arsenal failed to clear Robert Snodgrass’ whipped free-kick.
Freddie Ljunberg had to make a late adjustment following an injury to Hector Bellerin in the warm-up, and the interim manager was forced into another defensive change midway through the first-half, Kieran Tierney unable to continue after a collision with Antonio.
Mesut Ozil was presented with an opportunity to open the scoring a few minutes later, however he was unable to trouble David Martin, and headed Pierre-Emerick Aubameyang's cross tamely over the bar.
West Ham took a deserved lead shortly before half time, Angelo Ogbonna meeting Fornals's cross and finding the back of the net, helped by an Ainsley Maitland-Niles deflection.
The second half got off to a slow start just like the first, and it took a while for either side to fashion a chance, Snodgrass almost capitalising on another misplaced Arsenal pass in defence, a last-ditch block denying the Scotsman a goal.
Despite trailing, Arsenal struggled to get going after the break and Declan Rice almost doubled his side's advantage before the hour-mark, Leno on hand again to keep his team in it.
However, the visitors found a way back into the game on 60 minutes, against the run of play, through Gabriel Martinelli, the Brazilian teenager tapping home with ease on his full Premier League debut after finding space at the far post.
The equaliser gave the away side some much-needed momentum, and they took the lead shortly after, Nicolas Pepe cutting in from the right and curling a beautiful effort into the far corner.
West Ham's capitulation continued as Arsenal got a third goal in less than 10 minutes, Aubameyang getting in on the act as he volleyed home from six yards out, assisted by Pepe.
After looking devoid of confidence and out of ideas for 60 minutes, Arsenal managed to find inspiration out of nowhere to completely turn the game on its head, each member of the front three contributing to complete a remarkable comeback.
Pellegrini threw on Sebastien Haller to try and salvage the game, finally answering fans' calls to play up top, however his players looked lost and out of ideas.
With 20 minutes remaining, a large number of home supporters began to pile out of the stadium, unconfident in their team's ability to turn the result around, and they were proved right.
Arsenal saw out the game to secure their first win in, piling more pressure on West Ham manager Manuel Pellegrini.
Arsenal end dreadful run
The Gunners ended their worst winless run since 1977 with victory at the London stadium.
A terrible series of results under Unai Emery led to the Spaniard losing his job, however, following a draw against Norwich and a loss at home to Brighton, interim manager Freddie Ljunberg has managed to stop the rot.
Gunners' front three inspire comeback
Arsenal's front three sensed an opportunity to turn the game around, and pounced upon it to secure a remarkable win for their side.
Each of the attacking trio managed to get on the scoresheet, and gave fans hope of a new dynamic going forward, Martinelli, Aubameyang and Pepe all possessing pace, trickery and a killer instinct in front of goal.
Pressure mounts on Pellegrini
The way in which Pellegrini's side completely lost belief after conceding could be the tipping point that sees the manager lose his job.
The Hammers now have one clean sheet and one win in eleven Premier League games, sitting just one point above the relegation zone.