The Heavy Woollen Challenge was in the balance until five minutes from full-time when former Ram Jordan Grayston slotted over the winning penalty goal.
Both sides deserve huge credit for serving up such an entertaining game for the 2,000-strong crowd.
Dewsbury drew first blood when neat handling saw Karl Pryce send Shane Grady over wide on the right but the centre was unable to convert.
Bulldogs winger Wayne Reittie regained his feet following an ankle tap tackle to cross at the other end and level matters at 4-4,
Joel Farrell restored the Rams advantage when he nipped over from acting half back and Grady converted to put the visitors 10-4 ahead.
A piece of individual brilliance from winger Johnny Campbell restored parity for the Bulldogs.
Campbell, returning from a 12-month suspension, received the ball wide on the left, cut inside, kicked ahead, regathered and gleefully dived over, with Grayston converting on the stroke of half-time.
Both sides had early second half chances with Reittie having a second try disallowed for a forward pass, while Dewsbury’s Kieran Hyde dribbled the ball over the try line but a Batley defender hacked it dead before he could touch down.
Campbell raced down the left and over for his second try, which Grayston converted, but Grady completed his brace, leaping to gather Anthony Thackeray’s kick to score and is conversion levelled matters at 16-16.
Sam Wood looked to have snatched a dramatic win for the Rams eight minutes from time when he acrobatically dived for the line but Campbell somehow prevented him from grounding the ball.
Batley broke downfield and were presented the perfect opportunity when Dewsbury were penalised in front of their own posts and Grayston slotted over the goal to ensure Batley had the festive bragging rights.
Match report, plus reaction from coaches Glenn Morrison and John Kear in Thursday’s Batley News and Friday’s Dewsbury Reporter.