Ghana were under pressure in the opening moments of the game, with Swindon Town keeper Wollacott and his defenders struggling with communication, but the Black Stars grabbed the lead when Ayew put them in front with a magnificent strike.
Receiving the ball well outside the area, he controlled it, made space and fired home for his 10th goal at Nations Cup finals.
Ayew, sporting a prominent dressing over his left eye from the head injury he suffered in his side’s defeat by Morocco, celebrated almost angrily as he tried to inspire his team-mates.
After their opening flurry, the Panthers rarely created much until almost an hour played, when Wollacott made a smart save to deny Allevinah, who was inches short of poking home.
The game barely flowed and neither side was able to take a grip, but it was played in a lively atmosphere in Yaounde with fans of both teams making themselves heard.
Gabon striker Aaron Boupendza, scorer of their winner against Comoros, had a couple of shots blocked.
The Panthers need a point to reach the last 16 when they face Morocco in their final group match on Tuesday while Ghana will take on winless Comoros, needing victory to remain in with a chance of progressing.