Gray blow for Scotland
The surgery also means Gray is a major doubt for Scotland's November internationals.
Gray missed Scotland's tour to Singapore, Australia and Fiji in June due to the problem and the 27-year-old is unlikely to be available for Gregor Townsend until next year.
Scotland face three home Tests in November – starting with Samoa, before hosting powerhouses New Zealand and Australia.
"Richie Gray trained earlier this week, but he needs to be operated on for a back injury,"Toulouse coach Ugo Mola said, but did not reveal how long the club expect Gray to be sidelined.
The forward's absence is not only a blow for Scotland, but also for Toulouse – the fallen giants and record four-time European champions having already lost hookers Peato Mauvaka (hamstring) and Julien Marchand (broken hand) to injury during last week's 19-14 friendly victory against Racing 92.
All three forwards will miss Saturday's Top 14 opener at newly-promoted Oyonnax.
With two hookers out, Toulouse signed recently-retired 36-year-old David Roumieu as injury cover until the end of November.
The former Castres, Bayonne and Biarritz player will make his Toulouse debut against Oyonnax.