The Hammers opened the scoring through Jack Collisonâ€™s fine strike in the 18th minute after he controlled on the edge of the area before firing through a crowd of players.
Four minutes later, Lukas Podolski levelled for the Gunners with a superb 25-yard strike from Jack Wilshereâ€™s pass and the score stayed at 1-1 until the break.
The second half saw a completely different Arsenal in action and threw down the gauntlet by scoring four times within ten minutes to put the contest beyond doubt prior to the hour-mark.
Olivier Giroud made it 2-1 in the 47th minute when he hammered home Theo Walcottâ€™s corner at the near post for his first goal since the end of December before Podolski teed up Santi Cazorla who produced a neat backheel.
A fourth goal was conjured when Podolski found space down the left before finding Walcott who fired home with a first-time effort before Giroud wrapped it up thanks to another Podolski pass.