The Shrewsbury right-back, on loan from West Brom, sustained the problem early in the second half of the 1-1 draw with Crewe at Gresty Road and he will now miss a crucial stage of the season.
Town boss Graham Turner told the club's official website: "I'm told it's a Grade one/two hamstring injury. He's had a scan at West Brom. They are diagnosing a serious pull and the possibility of him being out for four weeks.
"He will need a bit of time to recover once he starts training again so it's a blow as he's been doing quite well for us.
"He's been getting forward a lot better now and has looked like he's been enjoying playing there so it's another blow to us on the injury front."
Jermaine Grandison suffered a slight setback in his recovery from a hip injury but he hopes to return to training again later this week, with the defender requiring another week or so before he is match ready.
Connor Goldson or Rob Purdie are the likely contenders to step in for Gayle, starting with this weekend's home clash against Oldham.