After taking an early lead the Knights kept their hosts at arm’s length for much of the game.
However, with the final whistle close their efforts were undermined by an infringement that allowed Pirates to kick for what proved a match-winning position close to the line.
Lawday stretched to touch down making the conversion a formality and Doncaster were beaten.
An impressive driving line-out had seen Knights’ hooker Ben Hunter go over after seven minutes, but Simon Humberstone missed the conversion.
Full-back Paul Jarvis was hurt just moments later to be replaced by Charlie Foley and tryscorer Hunter also succumbed to injury before the 15-minute mark, David Nelson taking his place.
Will Cargill skewed a penalty attempt wide for the hosts before, close to the interval, Nelson touched down and Humberstone’s conversion made the score 12-0.
The Pirates were back in the game when Foley’s kick was charged down and Alex O’Meara went over for an unconverted try only for Knights to restore their advantage through Josh Tyrell’s score, Humberstone’s kick making it 19-5.
Pirates barrelled over for a converted try from Tom Duncan, and a penalty put them just 19-15 behind and set up the frantic finale.
A pre-match minute’s silence was immaculately observed for Knights prop Ian Williams, who tragically died a fortnight ago.
Yorkshire Carnegie lost 41-22 at Bedford Blues on Saturday as the hosts struck back after the break.
Carnegie had recovered from 17-3 down to be level 17-17 shortly after the interval.
Michael Le Bourgeois went over for an early try and Will Hooley added the conversion for Bedford before Will Homer replied with a penalty.
Winger Howard Packman and second-row Will Carrick-Smith scored unconverted tries to make it 17-3 midway through the first half, but Callum Irvine chipped over the defence for Andy Forsyth to race through and score; Homer converted.
Carnegie levelled inside a minute of the re-start when Richard Beck broke clear before passing to Forsyth, who found McColl to finish off for a converted try.
Hooley put Bedford back in front before Packman and Dean Adamson scored converted tries.
Carnegie prop Marc Thomas powered over ahead of Bedford captian Le Bourgeois touching down for his side’s sixth try of the game, which Hooley converted.