Angelo Ogbonna had sent the Hammers into a first-half lead in the capital, but the Gunners turned things around in the second period to hand Freddie Ljungberg his first win as interim boss and secure their first league success since the start of October.
The victory has moved Arsenal into ninth position in the Premier League table, while West Ham remain in 16th spot, just one point outside of the bottom three.
Michail Antonio was back to lead the line for West Ham at the expense of Sebastien Haller, while Gabriel Martinelli made his first Premier League start of the season for Arsenal, who had to make a late change to their XI with Ainsley Maitland-Niles taking the place of Hector Bellerin.
The first half-chance of the match fell to the home side in the fifth minute when Antonio found some space just outside the Arsenal box after smart work from Felipe Anderson, but the attacker could only fire over Bernd Leno's crossbar.
Pablo Fornals and Anderson continued to combine in the final third for the home side, although opportunities were few and far between in the early exchanges as both teams failed to find the final pass.
West Ham had a shout for a penalty in the 22nd minute when Anderson went down under a clumsy challenge from Sokratis, but neither the referee nor VAR believed that an offence had taken place.
Fornals sent a low strike into the arms of Leno in the 26th minute after a half-cleared free kick, but clear chances remained few and far between at the London Stadium.
Arsenal were forced into a change in the 29th minute when Tierney picked up an arm injury, with Sead Kolasinac sent onto the field as a replacement on the left side of the back four.
The visitors had a huge chance to take the lead in the 33rd minute when Pierre-Emerick Aubameyang picked out the head of Ozil with a dangerous cross, but the German placed his effort over David Martin's crossbar.
Antonio then tested the reactions of Leno down the other end after the attacker had worked his way into a dangerous position before releasing a strike.
West Ham took the lead in the 38th minute, though, when a header from Ogbonna hit the back of Maitland-Niles before dropping into the back of the net. VAR had a look at a potential handball, but the goal was eventually given, which sparked more celebrations inside the stadium.
Nicolas Pepe sent a low cross into the arms of Martin as Arsenal looked to respond before the break, but another disappointing first-half performance saw the Gunners go into the interval behind.
Ljungberg resisted the temptation to make any changes at the break, and the Gunners came under more pressure at the start of the second half with Mark Noble firing over from distance.
Aaron Cresswell became the second player in the book for West Ham when he chopped Pepe to the ground in a wide position, and the left-back was forced off with an injury before the resulting free kick was taken.
West Ham came close to a second in the 55th minute when a defensive mistake from Arsenal led to Snodgrass breaking into a dangerous position, and the Scotland international's effort was deflected just wide of the post.
Rice then fired one into the arms of Leno from distance with the Hammers carrying all of the threat heading towards the final 30 minutes of the London derby.
Arsenal were a bag of nerves at the back with Antonio continuing to chase down the ball, but the Gunners found the back of the net just past the hour when Martinelli turned a low Kolasinac cross into the back of the net. It was a smart finish from the 18-year-old, who had struggled to influence proceedings up until that point.
The leveller changed the atmosphere inside the stadium, and there is no question that Arsenal had been boosted with the Gunners passing the ball with more confidence in the final third of the field.
Indeed, the visitors scored a second in the 66th minute when Pepe, who has been heavily criticised since arriving from Lille, worked the ball onto his left foot before picking out the far corner of the net in impressive fashion.
The Arsenal fans had been silenced for much of the first half, but they were treated to another goal in the 69th minute when Aubameyang turned a Pepe cross into the back of the net from close range.
Haller was introduced as Manuel Pellegrini desperately attempted to turn the tide, but Ljungberg's side were full of it having scored three times in the space of nine second-half minutes.
Rice continued to bite into challenges in the middle of the park, but the Hammers appeared to have run out of ideas in the final third as the match drifted towards the final whistle.
Seven additional minutes were signalled at the end of the 90 - that did not stop a number of the home supporters heading for the exits, though, and the Gunners comfortably eased their way to all three points, even coming close to a fourth when Aubameyang had one deflected over the crossbar.
Next up for West Ham is a trip to Southampton on Saturday, while Arsenal will continue their league campaign at home to Manchester City on Sunday after a trip to Standard Liege in the Europa League.
WEST HAM UNITED (4-4-1-1): Martin; Fredericks, Balbuena, Ogbonna, Cresswell (Masuaku 51'); Fornals, Rice, Noble, Snodgrass (Holland 78'); Anderson (Haller 69'); Antonio
ARSENAL (4-2-3-1): Leno; Maitland-Niles, Chambers, Sokratis, Tierney (Kolasinac 29'); Torreira, Xhaka (Guendouzi 86'); Pepe (Nelson 88'), Ozil, Martinelli; Aubameyang