However, the defeat for West Ham - their fifth in a row - leaves Slaven Bilic and his squad looking over their shoulders towards the relegation zone.
Back up the other end, Michail Antonio volleyed wide after the ball fell invitingly to him after a Lanzini set piece, but the remainder of the opening period belonged to Arsenal.
Towards the end of the first half, Collins diverted a Mohamed Elneny effort over the crossbar, before Welbeck glanced a header straight into the hands of Randolph.
The final chance of the opening 45 minutes fell to Walcott but after breaking clear of the defence, he saw his shot well blocked by Randolph.
Three minutes later, Arsenal went in front through Ozil, who curled the ball into the bottom corner from 20 yards although Randolph will be disappointed not to have pushed the ball behind for a corner.
The goal gave Arsenal a greater belief to push forward for a second and Welbeck should have perhaps got it when receiving the ball off Walcott, but Randolph redeemed himself for his part in the opener.
However, the home side effectively put the game beyond doubt soon afterwards through Walcott, who benefited from a terrific cross from Ozil before providing the calm finish inside the area.
Arsenal had numerous chances to net a third, with Bellerin going close from the right flank, but they had to wait until the closing stages for Giroud to score with a stunning curling effort into the corner.
The result takes Arsenal ahead of Manchester United on goal difference and now they will take confidence into their away game at Crystal Palace on Monday.