Richie Partridge's excellent double handed the derby spoils to Chester.
Stockport took the lead in stoppage time when Jason Taylor's cross from the left was spilled by keeper John Danby and the ball just crept over the line.
Chester levelled it up after 53 minutes when the impressive Partridge blasted home sweetly from 15 yards.
Kevin Ellison then volleyed an effort onto the crossbar just past the hour mark before Partridge fired home from 20 yards with just nine minutes to go.