Ghana international Ayew went over in the penalty area after a coming together with Leicester defender Harry Maguire, but referee Martin Atkinson waved play on as he adjudged the former Swansea attacker to have dived.
Gallagher told Sky Sports on Monday's Premier League Daily Show that Atkinson made the right call not to award the penalty, before delivering his own verdict on Ayew's dive.
"Correct decision, but he deserves a booking," Gallagher said. "The referee will say there is contact, but the contact is from Ayew. That's one we should be yellow carding, particularly with what has panned out in the past couple of weeks. It wasn't good."
Atkinson did not give the 27-year-old a yellow card for trying to deceive him. Ayew has since come in for plenty of criticism for his actions, with many calling for him to receive a retrospective ban as did Everton's Oumar Niasse.
The Hammers failed to make the breakthrough during the remainder of the match, leaving Moyes in the bottom three with only one point from a possible six ahead of difficult matches against Everton, Man City, Chelsea and Arsenal