The 23-year-old has committed his future to Glasgow and will play his rugby at Scotstoun until at least May 2020.
The news is a big boost to the club, just three days before the first 1872 Cup match against Edinburgh Rugby at BT Murrayfield.
The 6ft 6in second-row has already played 79 times for Glasgow since making his debut against Edinburgh in 2012 and he has crossed the whitewash eight times.
A product of the BT Sport Scottish Rugby Academy and a recipient of the Macphail scholarship in New Zealand in 2012, Gray signed his first professional contract the same year he made his Scotland debut back in 2013.
He has since gone on to pull on the thistle 38 times, most recently in the Autumn Internationals where he scored in the games against New Zealand and Australia.
Part of Dave Rennie’s leadership group at Scotstoun, Gray spent two seasons as Club Captain under Gregor Townsend.
Renowned for his tireless work rate in both defence and attack, Gray was a member of the 2015 Glasgow Warriors PRO12 title-winning squad.
Speaking exclusively to Warriors TV Jonny Gray said: “This club is very special to me. It’s where I’m from, my family and my friends are here and it’s a city and a club that I love and I care about a lot. I’m very happy to be here and I’m proud to represent this city.
Jonny Gray has established himself as a key player for both Glasgow and Scotland”With the new coaches coming in it has been a very exciting time. Glasgow are a really ambitious club and have been for a few years and I’m delighted to be a part of it.
“When you run out at Scotstoun you represent more than yourself, you represent your club and your city. The supporters follow us all over and we all want to make them proud.
“There are huge benefits of staying in Scotland and I really appreciate the support from Scottish Rugby in helping me stay with the Warriors for another two years.”
Glasgow Warriors Head Coach, Dave Rennie added: “We’re rapt. Jonny has achieved an enormous amount for a guy of 23. He has 38 caps for Scotland and is playing his 80th game for Glasgow this weekend.
“He’s part of the leadership group here, he’s captained the side before and is a massive contributor about the place week in, week out.
“It’s massive for us, he’s a phenomenal player with a massive work ethic and the boys love him, so we’re rapt he’s going to be here for two more years at least.”
Glasgow Warriors Managing Director, Nathan Bombrys said: “Jonny is a huge asset for Glasgow Warriors and Scottish Rugby and it’s great news that he’s staying with us.
“We’ve watched him develop into a world class player over the last few years and it says a lot about the ambition of our club and Scottish Rugby that he has decided to stay in Scotland.”
Scottish Rugby Chief Executive, Mark Dodson said: “Securing Jonny for the next two years clearly shows Scottish Rugby’s determination to keep our best players in Scotland.
“We are delighted for the Warriors and our supporters that Jonny has pledged his future to Glasgow.”