Dewsbury fought back from 16-4 down to lead 22-16 midway through the second half before Batley replied and forced extra time with a Cain Southernwood penalty three minutes from time.
Batley had two chances to win the tie but Dominic Brambani was wide with a drop goal attempt before the Bulldogs stormed back downfield but took one drive too many and ran out of time before having chance to land the one-pointer.
Dewsbury drove forward early in extra time and when Paul Sykes had a drop goal attempt charged down, the Rams regained possession and moved the ball right for Fairhurst to spark jubilant scenes with the golden point drop goal.
It was an end-to-end tie as Macauley Hallett and Dewsbury’s Josh Guzdek traded early tries.
Dewsbury were forced into a major reshuffle after winger Gareth Potts was forced off with a rib injury and Batley took advantage to run in two quickfire tries.
Hallett collected Joel Farrell’s pass to grab his second before Tom Lillycrop crashed into a post but bounced over the line and two Southernwood conversions put Batley in control.
Sykes grabbed an unconverted try at the corner as Dewsbury hit back before Batley had Sam Smeaton sin-binned when he refused to hand the ball back after he was pushed dead.
Andy Kain broke through and sent Guzdek storming to the line, with Sykes converting as the Rams trailed 16-14 at half-time.
Dewsbury hit the front after 54 minutes as Dominic Speakman’s lovely grubber kick was gathered by Aaron Brown, who dived over inches before taking the ball dead. Sykes converted and added a long range penalty as the Rams led 22-16.
Batley responded as Brambani kicked through and regathered to score but Southernwood pulled his conversion attempt wide.
Southernwood’s penalty late in the game sent the tie into extra time but Fairhurst’s dramatic drop goal ensured Dewsbury progressed to the last 16.
Dewsbury Rams: Guzdek; Potts, Sykes, Brown, Morton; Glover, Kain; Sheriffe, Ward, Teanby, Walshaw, Igbinedon, Douglas. Subs: Fairhurst, Tonks, Adamson, Speakman.
Batley Bulldogs: Scott; Hayward, Smeaton, Hallett, Hitchcox; Southernwood, Brambani; Gledhill, Leak, J Brown, Day, Farrell, Manning. Subs: Rowe, Davey, Lillycrop, Chandler.
Referee: Jon Roberts.(RFL).