The League One side looked to be heading for a replay until strikes from Lewis Grabban, Neil Harris and Ashley Grimes inside the final 15 minutes at the Deva Stadium on Saturday saw them through.
Grabban, who was fortunate to still be on the pitch after a shocking late challenge on Laurence Wilson, poked the ball home from close range after 76 minutes after John Danby had saved Andrew Frampton's header.
Three minutes later Chris Hackett's right-wing cross was expertly brought down on his chest by Harris, who coolly slotted home.
David Martin's header hit the bar late on for the Lions and Grimes' fine strike from 20 yards gave the scoreline a rather flattering look.
Chester's best chance fell to Ryan Lowe, who lofted an effort over the bar in the 19th minute when he had just the keeper to beat.