The 23-year-old has played 18 times for the Warriors to date, contributing 81 points.
Thomson originally joined the club on a short-term deal from the Stormers during the 2016/17 season, scoring a try on his debut against Ulster at the Kingspan Stadium.
It was announced that he would be joining the club permanently ahead of the 2017/18 campaign and he has played a crucial role this year, steering the side to a 14-man victory over the Scarlets at Scotstoun as well as a Man of the Match performance against the Ospreys last month.
The new deal will see Thomson remain at Scotsoun until at least 2021 and he becomes the 13th player to put pen-to-paper this season.
The former South Africa U20s 10 has played for the Stormers in Super Rugby and Western Province in the Currie Cup.
Speaking to Glasgow Warriors' Official Club Podcast, Warriors Weekly, Thomson said: “I'm really excited to have signed for another two years. I've thoroughly enjoyed my time in Scotland so far and I really feel like my rugby has grown and I'm looking forward to the next two years.
“I love the style of rugby that Glasgow play and the atmosphere at Scotstoun is amazing.
“Hopefully I can be involved as much as possible going forward, Dave has stressed that he will pick people on form, so I want to continue to grow and help the team."
Glasgow Warriors Head Coach Dave Rennie said: "Brandon is a good man and has worked really hard to give us coaches a selection headache this season in a highly competitive position.
“He's played a big part in some massive games for us this year and is continuing to learn and develop his game. We look forward to seeing more of that over the next two seasons.”