Theo Walcott struck twice and Lukas Podolski netted a third as Arsenal came from behind to win at troubled West Ham and return top of the Premier League.
Arsenal dominated the first half but fell behind as Carlton Cole tapped home after Wojciech Szczesny spilled a shot.
The Hammers wasted chances to double the lead and Walcott equalised with an effort that Adrian should have saved.
Podolski crossed for Walcott to nod Arsenal ahead before lashing in to drop West Ham into the relegation zone.
Results elsewhere saw them slip from 17th and a point outside the bottom three to 19th and two points inside it.
The Hammers have won only one of their last 11 league games and will be desperate to respond at home to West Brom on Saturday.
Arsenal, by contrast, ended a run of four games in all competitions without victory and lead second-placed Manchester City by two points.
City beat Liverpool, who were top of the table at the start of the day and would have leapfrogged Arsenal had they won the late kick-off.
The importance of this match to Arsene Wenger was underlined by a line-up featuring only one change from that which played a full 90 minutes in Monday’s 0-0 draw with Chelsea at Emirates Stadium.
His side were also up against a West Ham team who kept clean sheets in their previous two home matches and welcomed experienced trio Kevin Nolan, Joe Cole and Carlton Cole back into the starting XI.
The hosts came closest in the early stages through a Mark Noble free-kick, but Arsenal soon began to build momentum.
Adrian reacted well to repel a goal-bound header from Santi Cazorla and Walcott volleyed wide when he should have scored.
West Ham’s threat was now being posed on the counter-attack, Mohamed Diame testing Szczesny after a powerful run, while, at the other end, Cazorla, Giroud and Mikel Arteta went close.
Arsenal weaved many a pretty pattern but lacked end product, with nobody on hand to convert Mesut Ozil’s cut-back, before Giroud failed to connect with a low Kieran Gibbs cross from invitingly close range.
Gibbs and Giroud – seeking a first goal in seven appearances – looked on in disbelief and Arsene Wenger cut a frustrated figure at half-time.
Their disappointment was compounded when, within a minute of the restart, Szczesny spilled a Nolan drive straight into the path of Carlton Cole and he made no mistake with the simplest of finishes.
Arsenal looked rattled and after Szczesny saved from Matt Jarvis when one-on-one, Joey O’Brien headed wide and Carlton Cole prodded off target; both when in glorious positions to double the lead.
Buoyed by their multiple reprieves, Wenger’s men poured forward and Adrian made a fine double stop to deny Cazorla and Ozil.
However, the Spanish goalkeeper will want to forget his next involvement: Walcott cutting in and scuffing a shot through his hands.
The equaliser followed Podolski’s arrival for an injured Ramsey, and the German marked his first appearance since suffering a hamstring problem on 27 August by helping turn the game on its head.
He provided a new focal point for the visitors and was involved in all of their best work, crossing from the left for Walcott to head his second.
With West Ham seemingly resigned to defeat, Podolski lashed into the bottom corner after a Walcott cross and Giroud’s lay-off.