Thornhill, pictured, decided to fall on his sword on Monday night following the club's 3-0 home defeat to Shaw Lane Aquaforce on Saturday.
That reverse followed a stuttering start to the club's First Division South campaign that had seen the Moatmen win three games away from home but fail to register a point at home.
After stepping up from coach to manage the club soon after the start of last term in the wake of Martin Rowe's departure, Thornhill guided Gresley to the play-offs and the Derbyshire Senior Cup final.
In a club statement, Gresley chairman Barry North said he was "gutted" over Thornhill's departure. After dismissing speculation that he had been sacked, he also revealed that he had tried to persuade the club's former coach to stay on.
North said: "To set the record straight Wayne Thornhill as not been sacked as speculated in the media. Wayne Thornhill informed me yesterday after a lot of soul searching he was resigning as manager of Gresley FC.
"I gave him time to consider his decision but he confirmed to me over text that he was resigning. I've always got on very well with Wayne and we are very grateful for everything he has done for Gresley over the past year as manager.
"Personally, I am gutted Wayne and myself have had a great working relationship I will miss him at the club. I wish him all the best for the future."
He added: "I shall be calling a board meeting as soon as possible, either sometime this week or early next week, to discuss our next move. Dave Langston has kindly said he will come in and work alongside Jamie Barrett as caretaker manager."
Former Romans midfielder and manager Langston, the father of Gresley midfielder Jack Langston, made an immediate impact within hours of taking over on Tuesday night. Aided by skipper and coach Barrett, the 49-year-old guided the club a 2-1 home win over Chasetown to end their barren start to the campaign at the Moat Ground.
Appointed by Rocester in 2010, former Bromsgrove Rovers and Stafford Town star Langston guided the club to the last 32 of the FA Vase – their best run in 26 years - before standing down at Hillsfield in 2013.
As a player, he made more than 150 appearances for the club between 1996 and 2001 and was an integral part of their Midland Alliance title-winning team in 1999.
Thornhill had not been helped by the loss of two key players for the entire season after striker Keiron O'Connell and defender Mitch Hanson were both ruled out with knee injuries in August.
Follow us: @evostikleague on Twitter | The NPL group on Facebook by clicking here: www.facebook.com/groups/TheNPL/
Keep up-to-date with our exclusive email newsletters.
Subscribe