The 25-year-old was withdrawn in the first half of Scotland's 39-16 win over USA on Sunday, which put them top of Pool B.
Meanwhile, Scottish Rugby says fly-half Finn Russell's ankle injury "will require further care and assessment".
Vern Cotter's side face South Africa on Saturday and a replacement for Gilchrist is due to be announced.
Edinburgh's Gilchrist tweeted: "Devastated. Big thanks for the support. All the best to the boys for the rest of the tournament #AsOne #RWC2015"
Samoa are Scotland's final Pool B opponents on 10 October with both of the upcoming games taking place at St James' Park in Newcastle.
"Gilchrist sustained the soft tissue damage in the 19th minute of the national team's 39-16 win over USA yesterday, with the recovery period expected to extend beyond the competition," said Scottish Rugby.
"Finn Russell has sustained an inversion injury to his ankle, which will require further care and assessment.
"A number of other players will require the ongoing care of the national medical team, however these are not considered an immediate concern."
Lock Grant Gilchrist is "devastated" after being ruled out of the rest of Scotland's World Cup campaign.