Black Stars assistant captain Andre Ayew made amends for his horrible miss against Liverpool last weekend as he scored West Ham's winner as they ended their difficult season on a positive.
Ayew netted to complete West Ham's comeback on 72 minutes after Burnley had led midway through the first half.
Vokes put Burnley ahead with his 10th Premier League goal on 23 minutes before Algerian striker Sofiane Feghouli equalised four minutes later.
The Hammers kept pushing and Ayew netted when Tom Heaton pushed Edimilson Fernandes' shot against his bar and he nodded home from close range.
The former Marseille man finished the season with six goals despite sitting out of action for four months due to injury sustained on his debut West Ham match against newly crowned champions Chelsea at the Bridge.