The young defender has returned to Chelsea for treatment.
"A scan has shown that Carl Magnay has got a stress fracture in his back so he has gone back to Chelsea and won't play again this season," Gray told the club's official website.
"I signed two strikers on loan last week, but having now lost Chris (Doig) and Carl, I might have to look at bringing in a defender before the loan deadline."