The 17-year-old is the latest Academy graduate at St Andrew's to be handed professional terms having progressed through the ranks at the midlands outfit, signing a two-and-a-half-year deal.
Birmingham-born Gray has been with the club since the age of seven and made his first-team bow as a late substitute in a 4-0 Championship victory over Millwall in October.
He made his full Blues debut in last month's 1-0 home defeat to Charlton and has made a total of five appearances for Birmingham this term.
Meanwhile, the Blues have recalled Amari'i Bell from his loan spell at non-league Nuneaton.
The 19-year-old left-back joined the high-flying Skrill Premier club on a youth loan in the summer and was due to remain there until January.
But manager Lee Clark has moved to recall him early after Mitch Hancox sustained a knee injury during Birmingham's 2-2 draw against Middlesbrough in the Championship on Saturday.