The former Crystal Palace winger is out of contract at the end of June and he will not be offered a new deal that that expires.
Gray found it hard to command a regular first team place at St Andrew's and managed only seven League games over the course of last season.