The Hammers had high hopes of progressing to the last-16 of the competition but were undone by some poor defending on the night.
Allardyce made 9 changes to the side that drew with Sunderland at the weekend but would still have expected more from his side.
The Hammers took the lead on 7 minutes through a fine strike from new signing Modibo Maiga. That was about as good as it got for the Hammers as Mario Boselli scored two first-half goals for the Latics to go along with a fine strike from Ivan Ramis.
With a 1-3 half-time deficit the Hammers didn’t improve much in the second half and an 84th minute penalty from Gomez was enough to move Wigan into the next round.