Cody McDonald scored in the first game of his second spell at Gillingham to earn his side a point against York.
The deadlock was broken when Gills midfielder Charlie Lee turned Patrick McLaughlin's corner into his own net to hand the visitors the lead.
Chris Smith could have doubled their lead from another McLaughlin corner but his header hit the post.
McDonald bundled in Myles Weston's cross late on to level on his return to the Priestfield.
McDonald, who scored 25 goals in 43 games in his previous spell at Gillingham, could have won it for his side late on, but York keeper Michael Ingham produced a smart stop from his header.
The draw means that Gillingham failed to return to the top of League Two, one point behind leaders Port Vale with a game in hand.
VIEWS FROM THE DRESSING ROOM
Gillingham boss Martin Allen told BBC Radio Kent:
"I don't think it was very good first half, but we were much better second half, and from 1-0 down it was good to get a point.
"Everyone here would recognise my focus has to be on Gillingham players and improving our performance, especially when we play here in front of our supporters.
"We cleared all the pitch, and spent hours getting the pitch ready, and the performance today was below the standards we set earlier in the season.
"We all want it the same as everyone else and it's about time we put something here for our fans, who pay, and send them home happy."
York City manager Gary Mills told BBC Radio York:
"It's a difficult place to come but I have nothing but praise for them from start to finish today.
"We know when you come to Gillingham you've got to defend long throws and I thought we dealt with that well, and then when we got the ball I thought we opened them up a few times and passed the ball as well as I'd like.
"I keep saying, especially if we play like that, we need to put a run of wins together to just help us climb that table a little bit - but if we play like that it'll come, it's got to come."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.