The summer successor to the long-serving Gary Roberts left Westwood Road after his side's 2-1 defeat at Biggleswade Town on Tuesday night left the Lilywhites second from bottom and without a win in 15 outings in the EVO-STIK League Southern's top flight.
In a statement on the club's website, officials said assistant manager Neil Midgley would be holding the fort while Gleeson’s successor is found.
Gleeson, pictured, faced a massive task attempting to rebuild City's squad this season and was praised for his efforts by chairman Kevin Satchell who told fans they acted to give the club a chance of beating the drop.
Satchell said: “I am really disappointed that it hasn’t worked out for Dan. He has worked incredibly hard and was faced with a very difficult situation when he arrived.
“Everybody has been hoping that results would improve but this hasn’t been the case and I feel we need to make a change now so that we still have a fighting chance of avoiding relegation as we embark on the second half of the season.”
City's outgoing manager thanked Satchell and the club for their support and wished his successor well in the joint statement announcing his departure.
Gleeson said: “I would like to thank everyone for the opportunity especially the chairman and the board, I accept the full responsibility for the results this season. However, the plight of the club which I inherited was out of my control but it is my sincere wish that the club moves forward.
"With this in mind, I wish my successor all the very best in their quest to remain in the Southern League Premier Division this season."
Follow the EVO-STIK League Southern on Twitter at @SouthernLeague1
Keep up-to-date with our exclusive email newsletters.
Subscribe