Arsene Wenger's side are in danger of failing to reach Europe's elite club competition for the first time in 17 years after a miserable run saw them surrender fourth place to Everton.
The Gunners needed a victory over their London rivals to climb back into fourth, but their European bid looked in dire straits when Matthew Jarvis struck for the visitors late in the first half at the Emirates Stadium.
That shock revitalised a previously lethargic Arsenal and German forward Lukas Podolski equalised minutes later before France striker Olivier Giroud put them ahead soon after the interval.
Wenger had made five changes from the team that just barely got past Wigan on penalties in Saturday's FA Cup semi-final, with Swedish midfielder Kim Kallstrom making his first start and Laurent Koscielny returning from injury.
But the Gunners had been underwhelming for long periods of that Wembley win over Championship opposition, prompting Wenger to suggest his team were guilty of complacency at times, and there were few signs of any improvement in the early stages against the Hammers.