The right-back, who has penned a two year deal, started his career at Hearts and moved to Old Trafford in 2005 for a fee in the region of £50,000.
He then had spells with Preston North End and Stevenage Borough.
"This is a great opportunity to play for a big club and to be part of something memorable," the 26-year-old told the Hibs website.
"I'm honoured to be Alan's first signing - he comes across really well - and now I can't wait to get started.
"Our first competitive game of the season is against Rangers in the [Petrofac Training] cup and then two games later we've got an Edinburgh Derby, so there is plenty to look forward to"
Boss Stubbs says Gray, a former Scotland under-21 international, will be joined by more new faces as Hibs gear up for the Scottish Championship campaign.
"David is a quality player with plenty of experience and a first-class attitude," he said.
"Hopefully his arrival will be the first of many new signings at the club over the next few weeks."
Former Manchester United youth player David Gray has become Hibernian manager Alan Stubbs' first signing.