Dewsbury earned their third win of the season to condemn their Cumbrian hosts to a second successive home defeat.
Town took the lead on five minutes with a try from young full-back Sam Forrester, converted by Carl Forber who added to the lead with a penalty.
Dewsbury, however, had fashioned a 12-10 lead by the break as Shane Grady took advantage of a slip by Tee Ritson to score and then the wily Anthony Thackeray put Luke Adamson in for the second. Kieran Hyde converted both and Town could only answer with a Forber penalty.
Crucially after the break Dewsbury were first to score when a long pass from Thackeray released Dalton Grant and after his burst down the touchline he fed Matty Wildie inside to score and again Hyde converted.
Town hit back with a close-range try from Marc Shackley, converted by Forber and then Hyde scrambled over for a Rams try after a Thackeray bomb had been spilled.
Forber kicked a penalty for Town to close the gap to six points but Tom Hemingway dropped a goal on 73 minutes and three minutes later Arron Brown got the touchdown after a desperate scramble over the Town line. Hemingway converted.