Anelka, who was Allardyce's talisman during his latter days as Bolton boss, had not featured for the Baggies in over two months but was named as one of six changes to Keith Downing's starting line-up from the Boxing Day draw at Tottenham.
The visitors had looked comfortable at 2-1 but two goals in two minutes from half-time substitute Modibo Maiga and skipper Kevin Nolan put West Ham back in front.
Downing's side did not let their heads drop and were back in the game almost instantly with a very smart finish from Saido Berahino, who later hit a post from a free-kick.
It means Allardyce's side remain in the Premier League bottom three and the 59-year-old was cursing even more when James Tomkins' name was added to the injury list when the defender was forced off with a groin problem after just 10 minutes.
"We didn't have any problems apart from James Tomkins getting injured," Allardyce said about his side's start to the game.
"It was a remarkable performance from our players considering we had four full-backs playing across the back four.
"Had we had a full back four fit, never mind all the other injuries, I think we would have won. Unfortunately, with players playing out of position we have conceded three goals."