Robin van Persie's strike after just 33 seconds condemned the Hammers to a 1-0 away defeat in the Premier League.
Allardyce believes that his side did not deserve to lose and hailed his players for the energy they showed against the Red Devils.
"We come to Old Trafford and in 30 seconds they score," he told Sky Sports. "It was a fluke goal, to say the least.
"It was a test of character for my players. We are all disappointed that we lost the match, but we kept our shape and our tactics.
"We couldn't help the fluke goal fortunately for Man United. You never know what could have happened if that had not gone in. It is disappointing that after all that we did not get anything from the game.
"I was pleased with the energy we had, especially in the latter end of the game. The energy that we showed today was outstanding."
Meanwhile, Allardyce thinks Van Persie could be a decisive factor in the title race, adding: "Manchester United have lots of players who will have good spells and can come up trumps when they need them to.
"Robin van Persie is a quality player and we have largely kept him quiet.
"But he will score 20 goals for Manchester United, maybe 30. In the end that is normally the difference."