The League Two visitors were heading out until the seventh minute of second-half stoppage time but then substitute Myles Hippolyte guided a deft header past Ashley Maynard-Brewer from Macauley Southam-Hales' corner.
Charlton had fought back from Chris Hussey's early opener. Steven Sessegnon's cross was turned in by a clumsy combination of County keeper Ben Hinchliffe and Joe Lewis in the 23rd minute with Albie Morgan finishing off a fine looped ball by George Dobson in the 39th minute.
"The build-up to the goal we can deal with better, the set-piece we can deal with better but I'm really disappointed that the corner is given - because the ball is not out of play," said Garner.
"The linesman is on the opposite side of the pitch, he's not up with the game - he's looking across and almost through Ash. Basically he has guessed and you can't be doing that.
"It's a frustration because we are a minute away from being in the next round. It's a disappointed dressing room but we have to prepare for another game.
"We had chances to get the third goal and kill the game. I don't think we were clinical enough in those situations. We should've put the game to bed and that can always come back and haunt you - which it did."
Stockport are still in the hunt to reach the third round of the competition for the third campaign in succession.
They had opportunities before their late leveller with Maynard-Brewer denying Ollie Crankshaw and Hippolyte. Sean Clare also made a fine sliding block on a Ryan Rydel strike.
Stockport manager Dave Challinor said: "Sometimes coming to places where you are the underdog and scoring early can be the worst thing. I felt we became a bit safe and almost tried to protect the game - especially as we're better on the front foot.
"I managed to have a chat at half-time and re-emphasise that belief in terms of how we play. Second half we were much better and the substitutes absolutely made a difference.
"We were thoroughly deserving of a replay and look forward to what the draw brings on Monday."
Asked if the awarding of the corner was contentious, Challinor said: "I would be guessing. I suppose you have to trust officials. You can look back on lots of decisions in the game and say was it this or was it that.
"I'm not too fussed because we scored from it. If it hasn't gone out and we've scored an equaliser then I'm absolutely going to take it. I will apologise for that, but glad the decision was made that has given us the corner and given us that chance."