A late flourish from captain Jason Holder and Nicholas Pooran helped West Indies set Afghanistan a daunting 312 to win on Thursday as they seek a morale-boosting victory after a poor World Cup campaign.
He leaves with just six wickets at an average of 69 and an economy of 5.79, and just 105 runs in nine innings.
For both Afghanistan and West Indies, the tournament has been a case of so near yet so far.
Shai Hope is on 50 his third half-century at this World Cup and Shimron Hetmyer is on 29 off 19 balls.
Gayle was caught behind after a slash against Dawlat Zadran for just seven and remains 10 runs short of Brian Lara's all-time record for the West Indies of 10,348 one-day global runs.
England semi-final permutations as they look to pip Pakistan
Ben Stokes (11), who has been in good form recently, was caught by Henry when he mistimed a shot on Santner's delivery. I agree with Kane that the wicket did change - for some reason it started to slow up and became hard to score freely.
After finishing the tournament with a 23-run defeat to West Indies, Gulbadin said "nobody has (played) 100% for the team or country".
But esteemed voices such as West Indies fast bowling legend Sir Curtly Ambrose have urged the 39-year-old left-hander to "bow out gracefully", allowing the next generation to take its turn.
"With Rashid, everyone just expects things from him, especially how he played the last two or three years", Afghanistan captain Gulbadin Naib said. Rahmat Shah (62), Najibullah Zadran (31) and Asghar Afghan (40) were also looking good as the Afghan side looked to be playing with more freedom than before. It was the highest score by an 18-year-old at a World Cup, beating Sachin Tendulkar's knock of 84 in 1992.
The Windies have made two changes, with opener Evin Lewis and paceman Kemar Roach in for Sunil Ambris and Shannon Gabriel.
If this is to prove Gayle's last match on the World Cup stage - he will be 43 at the 2023 edition in India - he exited on a low note, making room for a booming drive only to nick a wider delivery behind.
The big positive from the West Indies game was Ikram Ali Khil, whose footwork and speed between the wickets stood out in his 93-ball 86. Afghanistan vs West Indies 42th ODI Match.
On the other hand, Windies have won a single match. If you look at 2015 and what England did after the World Cup, they have built straight up to the 2019 World Cup and it's paying dividends.