Robert Green, in front of watching England boss Fabio Capello's assistant Franco Baldini, had pulled off a string of fine saves to keep the Gunners at bay.
However, with just two minutes left, Song dived to head home Gael Clichy's cross as Arsene Wenger's improving side kept up the pressure on leaders Chelsea.
Arsenal had plenty of momentum going into this afternoon's game after following up impressive Champions League performances with victory at Manchester City and marching into the quarter-finals of the Carling Cup.
However, Wenger had warned against complacency, with the Irons looking to battle their way clear of the relegation zone.
Arsenal started brightly, with Andrey Arshavin put away down the left a couple of times, but the Russian was unable to make the most of the openings.
On nine minutes, Song tripped Frederic Piquionne conceding a free-kick on the left, which Scott Parker - so impressive during the Hammers' Carling Cup win over Stoke - whipped in and Lukasz Fabianski punched clear.
At the other end, Arshavin's deflected cross flew through the West Ham six-yard box before Song sent a bullet header over.
Piquionne burst clear down the right wing, but then after getting to the box, the former Portsmouth frontman seemed to run out of ideas and Arsenal cleared before former Gunner Luis Boa Morte drove a 20-yard effort over.
Bacary Sagna arrived on the end of Song's through pass to pull the ball back for Cesc Fabregas, who swept it goalwards, but Green produced a superb reflex save to deny the Arsenal captain.
West Ham remained positive, though, as Mark Noble ran at the Arsenal defence, and his 22-yard strike was straight at Fabianski.
Gunners fans were starting to get restless as half-time approached, with West Ham continuing to frustrated the home side.
Green again denied Arsenal when he kept out Song's angled drive and from the resulting corner, the often-criticised England keeper flicked over Sebastien Squillaci's looping header.
The hefty challenges continued in the second half, this time Parker on Denilson, taking the legs of the Arsenal midfielder as he followed through, but again there was no action from the referee.
Arshavin broke clear down the left and darted to the edge of the West Ham penalty area, but dragged his low shot wide.
Boa Morte was cautioned for pushing over Denilson as the Brazilian charged forwards.
From the resulting free-kick, around 35 yards out, Samir Nasri crashed the ball against the crossbar, with Green beaten.
The Emirates Stadium faithful upped the tempo as Arsenal went on the offensive.
After a goalmouth scramble, play was held up to allow Parker treatment as he had been struck in the face by Fabregas' shot.
Arshavin then went tumbling as Manuel Da Costa looked to have tugged his arm, but the referee waved away penalty appeals.
With 23 minutes left, Wenger turned to Theo Walcott as the England man, who had scored twice in the midweek Carling Cup win at Newcastle, replaced Denilson
Chamakh got on the end of Arshavin's free-kick into the box, but could not guide the ball either side of Green.
Fabregas sent Walcott away down the right, and he dashed into the area, before sliding the ball under Green - only for it to come back off the inside of the far post and bounce to the grateful Hammers keeper.
Green again came to the Hammers rescue when he saved Walcott's deflected effort before then keeping out Fabregas' snapshot as the Gunners pressed for a late winner.
However, the Irons keeper was finally beaten with just two minutes left when Song headed in Clichy's cross at the far post as Arsenal took all three points.