A Kerrea Gilbert o.g. had given Town the lead but a Steve Howard penalty and then a winner from Lloyd Dyer turned the game.
The early promise shown by the home sided counted for nothing as Leicester came through to win.
"Leicester are a good side but we could have beaten them had we carried on our early momentum, but the penalty set us back," said Gray.
"Before the penalty we were on the front foot, we were playing the game in their half but the penalty lifted them.
"Leicester are the best side in this league but we stuck at it. We put in plenty of effort but were probably beaten on ability.
"Our final ball was frustrating at times. We had a good spell at the end of the game, we threw bodies forward and it nearly came off for us.
"Defensively though we were caught out for their second goal and that was disappointing."