A product of Livingston"s youth team, Gray made his first team début as a substitute on 7 May 2011, against Alloa Athletic on the final day of the season. The following season on 9 August 2011, he came on as a substitute in Livingston"s 5–0 victory over Stirling Albion in the Challenge Cup. After just two first team appearances he was loaned out to Berwick Rangers.
Another loan spell followed and on 8 May 2012, he signed a one-year contract extension to remain with the club
In October 2012, Gray was once again loaned to Berwick. Berwick Rangers
On 21 October 2011, he was loaned to Third Division side Berwick Rangers on a one-month emergency loan deal, making his début the following day in the Scottish Cup.
Gray went on to make his league debut on 5 November against Elgin City. After four appearances for Berwick his loan deal was extended by an extra month.
Berwick requested his loan be extended further but due to injuries at Livingston he was recalled.
His return to Livingston was short and on 7 January 2012, he returned to Berwick until 5 May. In all he made 20 appearances for Berwick. The following season on 27 October 2012, Gray returned to Berwick on a three-month loan deal.
He made his debut the same day, coming on as an 58th-minute substitute against Queen"s Park, replacing Neil Janczyk in a 1–1 draw.
After leaving Livingston, Gray signed for Berwick permanently in May 2013.