The home side dominated the first 45 minutes and Matt McClure gave them a 1-0 lead before half-time.
But the visitors rallied in the second half, despite having no recognised striker up front following James Akintunde's injury.
Lucas Dawson equalised from the penalty spot shortly after the break and then James netted the winner eight minutes from time.
"It's an absolutely massive result," said the Chester midfielder. "We could have won all of the games we've played prior to this one, for one reason or another it's not happened.
"First-half we were no where near good enough, not winning our battles. Second half we got on top a little bit and we looked like we were going to score on the break.
"I thought defensively we dealt with everything they threw at us in the second half. First-Half we just weren't good enough as a team.
"I enjoyed scoring a lot, I'd ran far enough to get there to score! I needed to score otherwise I wouldn't have been too happy! It's my second spell at the club and everyone knows what I'm like as a player, I'm full of passion and emotion - that came out there when I scored. I'm delighted for the lads, who have put a shift in during every game."