Marlon Harewood put the Hammers ahead on 43 minutes before Julio Arca levelled things up 7 minutes into the second period of play at Upton Park.
With just 3 minutes remaining, substitute Stephen Elliott scored the winner for the visitors to clinch the Coca-Cola Championship title.