Born in Withernsea, East Riding of Yorkshire, Gray began his professional career with Nottingham Forest, emerging from the youth system with players such as Steve Hodge and Colin Walsh. He joined Barnsley in 1984 and continued to build a reputation as a steady and versatile player, scoring 11 league goals in the 1986–87 season. He moved to Aston Villa in 1987 and won promotion the following year and runners-up in the First Division in 1990. Gray joined Southampton in September 1991 for a fee of £200,000 as one of Ian Branfoot's first signings. Initially, this appeared to be a useful signing for the club as he could play either at left-back as cover for Micky Adams or in midfield, but a serious Achilles tendon injury sustained in an FA Cup match against former club Bolton Wanderers ended his playing career. Earlier in that FA Cup run, Gray scored his only goal for Southampton, in a replay against Manchester United at Old Trafford. Micky Adams hit a probing left-foot pass which dropped between Peter Schmeichel and Paul Parker. Gray nipped between the goalkeeper and defender to stroke the ball home from just outside the area. Southampton eventually went on to win the game in a penalty shoot-out after scores were level 2–2 after extra time. This was the first ever such shoot-out involving First Division sides.
Coaching and management career
Southampton
After his playing career was finished, Gray joined the coaching staff at The Dell before moving to Wolverhampton Wanderers in June 1994 as reserve team coach. His family were unable to settle in the West Midlands at this time, so he returned to Southampton, initially working in the community office, before becoming reserve team coach under Dave Jones in July 1997, moving up to first team coach in November 1998, a role he retained after the appointment of Glenn Hoddle as manager in January 2000. When Hoddle was lured away to Tottenham Hotspur in March 2001, Gray initially took over as caretaker manager, before taking on the role permanently in June, as Southampton moved to their new St Mary's Stadium. Early results were poor and chairman Rupert Lowe panicked about the effect on the club's investment in the new stadium and Gray was sacked after little more than 3 months in charge, to be replaced by Gordon Strachan. During his brief tenure as manager, he broke Southampton's transfer record, signing Rory Delap for a fee of £4 million.
Coaching
He has since coached successfully at a number of football clubs. These include Aston Villa, where he and John Deehan acted as joint caretaker managers after the departure of John Gregory. Stuart Gray moved briefly to Crystal Palace to assist caretaker manager, Kit Symons. He then joined Dave Jones at Wolverhampton Wanderers in the capacity of assistant manager. The two had previously worked together at Southampton. After the dismissal of Jones from Wolverhampton, Gray remained as assistant manager to Glenn Hoddle, once more acting as caretaker manager after Hoddle's departure; he had served as a caretaker for a month between the departure of Jones and arrival of Hoddle.
Northampton Town
On 2 January 2007, Gray was appointed as the manager of Northampton Town after accepting a -year contract; he replaced John Gorman who had resigned on 20 December 2006. Gray was sacked as Northampton Town Manager on 8 September 2009, following relegation from League 1 in the 2008–09 season and being 16th in League 2 after six games in the 2009–10 season.
On 19 January 2010 Gray became the first-team coach for Burnley. On 30 December he was appointed caretaker manager following the departure of Brian Laws. Gray left Burnley on 13 May 2011 as part of a restructuring after the club failed to achieve even a play-off place in the season just ended. Gray became first-team coach at Portsmouth but was made redundant in April 2012 as part of cost cutting due to their financial difficulties.
Sheffield Wednesday
In December 2012, Gray was hired by his former Southampton colleague, Dave Jones, as a member of the coaching staff at Championship club Sheffield Wednesday. Following the departure of Dave Jones from Sheffield Wednesday at the end of November 2013 Gray took over as caretaker manager with a view to taking on the managerial role permanently, and as of 8 February had led Wednesday to a run of 11 unbeaten games in all competitions. Stuart Gray was appointed as head coach of Sheffield Wednesday following the 2–1 win over Rochdale in the FA Cup on 25 January 2014. In his one full season in charge of the club, he secured their highest finish for 6 years, finishing 13th in a Championship campaign that also saw Wednesday equal their clean sheet record for a season. Following a takeover at Sheffield Wednesday by Thai businessman Dejphon Chansiri, Gray was sacked in the summer of 2015 and replaced by head coach Carlos Carvalhal.