The centre-back, a summer signing from Norwich, struck in the dying embers of the match as Owen Coyle's men came back from two goals down at the DW Stadium on Tuesday night
The Scottish boss looked to be heading for a second costly defeat in a week following Saturday’s shock 1-0 loss to Bournemouth as first-half goals from Theo Robinson and Chris Brown put Doncaster ahead.
But a switch in formation at the break and the arrival of Marc-Antoine Fortune helped to inspire a fightback, as first Shaun Maloney curled home a superb 56th-minute free kick before Barnett turned home Fortune’s cross at the death.
Wigan started brightly enough, and they had strong claims for a penalty turned down when new signing Grant Holt appeared to be bundled over in the box by Reece Wabara - but referee Carl Boyeson waved the appeals away.
After 24 minutes the home fans’ frustration mounted when a long ball forward was neatly controlled by Robinson, who turned and finished for his second goal in as many games.
Wigan’s task got even harder two minutes before the break when Bongani Khumalo delivered a cross into the box where Brown was on hand to nod home.
But the arrival of Fortune at the break and a switch to 4-4-2 gave Wigan their missing spark.
The change reaped almost immediate rewards 11 minutes after the restart when Fortune was bundled over on the edge of the box and Maloney curled home the free-kick.
And with time running Fortune proved the architect again, this time finding space on the flank before crossing into the box, where Barnett applied the finish to ensure it ended all square.