© PA Photos
Barnsley started brightly and were ahead in only the third minute when Dagnall broke free of the Dons' defence before firing the ball past David Martin.
The hosts responded well to the goal and Luke Steele was forced to make a good save to prevent Dean Bowditch from equalising with his effort from 18 yards.
However, it was Barnsley who found the crucial second of the game thanks to a close-range effort from Marlon Harewood following good work by Scott Wiseman on the wing.
Karl Robinson's side struggled to compete against their Championship opponents and were lucky to be only two goals behind at the break.
Barnsley's joy quickly turned to concern just before the hour mark, when Kelvin Etuhu was forced off with what looked like a potentially serious injury.
The momentum changed following the lengthy stoppage and MK Dons quickly took advantage, with Bowditch slotting the ball into the bottom corner after beating the offside trap.
Barnsley were forced to change their approach following the goal and it was the home side who looked the most likely to score the crucial fourth goal of the game.
However, Dagnall doubled his personal tally for the afternoon in stoppage time, rounding Martin before passing the ball into an empty net.
A difficult afternoon for the hosts was completed when Alan Smith was shown a red card for leading with an elbow in the closing stages.