The Gunners had slumped to successive defeats against Manchester City and Chelsea to leave them facing an uphill battle to regain a place in the top four.
Manager Arsene Wenger knew there was no more margin for error and despite falling behind in this rearranged Boxing Day fixture to a fine strike from Jack Collison, his side found its form, equalising through Lukas Podolski's 25-yard screamer.
Olivier Giroud scored his first goal in six games to put the host in front just after the restart, before Germany forward Podolski tore the Irons apart, charging down the left to set up Santi Cazorla, Theo Walcott and Giroud again as Arsenal romped out of sight before the hour.
West Ham had to play the closing stages with 10 men after what looked a serious injury to substitute Daniel Potts, who was carried off on a stretcher after a clash of heads.
The Gunners now head to Brighton & Hove Albion this weekend looking to keep alive its FA Cup hopes, before next week's visit of Liverpool will again put the character of Wenger's squad to the test if it is to close back within striking distance of UEFA Champions League qualification again.
Arsenal signalled its intent early on as Walcott made a darting run inside West Ham fullback Joey O'Brien, but his low centre through the six-yard box was behind the onrushing Giroud.
Jack Wilshere needed treatment after he was caught on the ankle by West Ham midfielder Collison. The England man, who has just returned to full fitness this season after more than a year out, was soon able to continue.
On 15 minutes, Walcott was almost away again down the right, but Winston Reid did just enough to get across as the England forward shot into the side-netting.
At the other end, Matthew Taylor's 20-yard effort was deflected up and on to the roof of the net by Thomas Vermaelen.
Arsenal failed to clear its lines, and from a second corner on 18 minutes, the ball was headed out to the edge of the penalty area.
Collison took one touch to set himself before firing a superb strike through a crowd of players and into the bottom corner.
Arsenal produced the perfect response to level within four minutes.
The ball was fed out from Wilshere to Podolski on the left, some 25 yards from goal.
The German promptly stepped inside before unleashing a blistering low, left-foot strike into the far corner.
Arsenal soon settled back into its trademark passing rhythm.
A quick one-two down the left through Giroud and Kieran Gibbs played Podolski in on goal, but his snapshot was hacked clear by O'Brien.
West Ham, though, was in again as half-time approached when a long ball split the defence and fell to Cole, whose chip was only part-blocked by Arsenal goalkeeper Wojciech Szczesny and Aaron Ramsey had to scramble back to boot the ball off the line.
In stoppage-time, Cazorla's curled free-kick was heading to the top corner before Irons keeper Jussi Jaaskelainen clawed it away.
Arsenal was ahead just after the restart.
The Irons had been pressed back by a series of sweeping attacks.
Walcott clipped a corner towards the near post, where Giroud arrived to drill it back past Jaaskelainen for his first goal since a late double in the 7-3 win over Newcastle United on 29 December.
Before West Ham could mount a comeback, it was 3-1 on 53 minutes.
Walcott got away down the right, before the ball was recycled back to the other flank, where Podolski played a one-two with Giroud before squaring for Cazorla, who rolled in a clever backheel.
Arsenal was flying and immediately chalked up a fourth on the break inside 60 seconds.
Podolski was set away down the left, charging clear of a stretched West Ham defence before clipping a perfectly-weighted pass across into the path of Walcott, who smashed home first time at the far post.
Arsenal, however, was not finished as Giroud added a fifth on 57 minutes, with Podolski again the provider after another surging run down the left.
After all the high drama, the tempo of the match dropped as fast as the temperature.
There was a lengthy stoppage with 18 minutes left as substitute Potts needed treatment after a clash of heads, eventually taken off on a stretcher, covered with an emergency blanket in a neck brace and receiving gas. As all had been changes used, West Ham had to continue with 10 men - through some 12 minutes of stoppage-time.