Gray joined Bath Rugby at the beginning of last season on a short term contract after injuries to Gareth Delve and Adam Vander ruled the pair out of the season, leaving the club in need of further cover in the back row. However, despite showing plenty of promise which launched an international career with Scotland, Gray's first team opportunities were limited due to the outstanding form and durability Zak Feaunati, Michael Lipman, Andy Beattie and James Scaysbrook.
With Gareth Delve having fully recovered from shoulder and knee injuries, and England Under 19 Chris Goodman growing in stature, competition for places in the back row next season is likely to be intense.
"Scott's first team opportunities with Bath Rugby this season have been limited," said Director of Rugby Jack Rowell. "Scott is an ambitious young man and he feels that in order to enhance his international ambitions a move north of the border is necessary. We would like to thank Scott for his tremendous commitment to the cause this season and his valuable contribution and wish him all the very best as he embarks on a new career with Borders."
Scott leaves with fond memories of Bath Rugby and said, "I have really enjoyed my time at Bath Rugby. The players, coaches and fans have been superb and I would like to thank them all. Having broken into the Scotland squad I am in need of regular first team rugby and therefore a move to the Borders will be a new and exciting challenge for me. Bath Rugby is a great club and I would like to wish the club all the very best next season."