The win saw Crystal Palace moved to the 9th position of the Premiership with 26 points.
The Black Stars striker scored in the 90th minute of the game in a sensational manner.
Ayew danced through the Hammers defence on the edge of the box and then brilliantly beat goalkeeper Roberto with a calm chip to claim the three points.
He also set-up Cheikhou Kouyate with a knock-down for Palace’s equaliser, as the midfielder swept home a volley from seven yards to cancel out Robert Snodgrass’ opener.
Manager Roy Hodgson described Ayew’s goals as a sensational 90th minute winner that will “live long in the memory”.
Meanwhile, fourth place Chelsea lost three valuable points when they were beaten 2-0 by Southampton at Stamford Bridge.
The loss cut the gap between Chelsea and Tottenham Hotspurs whom they defeated last weekend to three points.
Tottenham defeated Brighton to move to the fifth position with 29 points. Manchester United on the hand also climbed the table to 7th after walloping Newcastle 4-1 with two goals from Anthony Martial.
Leaders Liverpool played Leicester City later in the evening, whilst Man City will visit Wolves tomorrow.
Watch video of the amazing goal below
Source: classfmonline.com