The 1-0 defeat at Yeovil saw the Cobblers replace the Glovers in the relegation places and Gray was a disappointed man after the loss.
He said: "It was an important match, it was a disappointing result.
"We dominated possession at times but we gave the ball away too easily. The result was the be all and end all.
"We came here determined not to be beat and there are some disappointed players in my dressing room. But we have got to move on and there are seven games to go, beginning with the next one at Bristol Rovers.
"Out of adversity sometimes people respond and we have got to get ourselves out of it. There are still 21 points to go for and we've got to keep believing until it's mathematically impossible."