Darren Moore's side had only won one of its past five league games but scrapped to a battling victory at bet365 Stadium.
A set-piece routine in the 25th minute put West Brom in front, Gayle heading in at the back post after Ahmed Hegazi turned debutant Stefan Johansen's free-kick back across goal.
Peter Etebo hit an ambitious 30-yard free-kick over and saw a volley deflect wide either side of half-time as Stoke, which recorded a single effort on target, sought a comeback.
Tom Ince went close to scoring a superb goal in the 65th minute, but after a dazzling solo run he drilled just wide, and he then wasted a late free-kick by firing over.
West Brom held on to secure a sixth win in its past seven away league games to boost promotion hopes, while Stoke sits 17th after a fifth defeat in six games in all competitions.