Warrington-based Rylands landed a drop goal with seven minutes left to go in front but Chester snatched the win when back row forward Paul Welch crossed on the last play.
Tom Bradfield, Paul Foster and Johnny Rae scored in the first period with Mark Kingsley converting all three as the sides went in to the break level at 18-18.
Defence dominated the second half until the hosts edged ahead with a one-pointer but there was enough time left for one more twist.
Bradfield broke the line and the ball was thrown wide to the left and Welch powered over from 25 yards out to score in the corner.
Chester handed a debut to Andrew Oakden at full back and teenager Jordan Smethurst made his first team debut in the centres.
Gladiators started the game well but fell behind when the home side scored out wide off the back of a scrum.
Bradfield drew the visitors level when he picked up Smethurst’s pass and surged in under the posts to score.
Rylands regained the lead when a well worked chip kick resulted in a score on 20 minutes.
Chester found the perfect response when veteran Foster pounced on a loose ball to score and Rae then raced 70 yards from the kick off to put them in front.
Sharks levelled before half time from close range with the game well poised at 18-18.
Both sides misfired with ball in hand after the restart but that was in part down to some fierce defence.
Chester never looked like conceding another try so it was no surprise to see the hosts choosing to send over a drop goal on 73 minutes.
Rylands began to use up the clock and won a penalty with two minutes left but the two-point attempt missed the mark.
From the resulting tap, Chester moved forward and Bradfield burst into space before the ball was moved right and Welch touched down to seal the points.