The Reds produced an impressive second-half comeback to seal a well-deserved win against the struggling hosts.
It was a disappointing first period at Gresty Road, one which ended with the Reds a goal behind.
Crewe went in front after 32 minutes courtesy of a scrappy goal.
James Jones crossed in low from the right and as Marcus Haber stabbed a shot towards goal, the ball took a deflection off Jon Guthrie before trickling past Adam Davies and into the net.
Rivelin Valley Road Sheffield: Body found after police search of Rivelin Valley
Hosepipe ban: Reservoir near Sheffield less than 15 per cent full as photos show how water levels have plunged
The Long Blondes: Leadmill cancel gig after allegations surface against band creator Dorian Cox
Yorkshire Water announces hosepipe ban as Government prepares to declare drought in UK
Sheffield businessman Rong Ren ordered to pay £1.1m by courts over phones scam
Earlier the Reds had dictated much of the play, with the recalled Ashley Fletcher seeing an early effort hacked off the line by George Cooper.
Conor Hourihane also went close as his deflected shot flew narrowly wide.
Davies had to be alert to keep out Bradden Inman’s strike just before the hosts went in front.
The Reds evened it up nine minutes into the second period.
Hourihane’s corner-kick wasn’t cleared by a hesitant Crewe defence and Sam Winnall was quickest to react, darting in to poke home his 18th goal of the campaign from close range.
The Reds then went in front midway through the second half.
This time Mawson produced a super finish as he curled a free-kick into the bottom corner from well outside the box.
Debutant substitute Harry Chapman saw a late shot tipped onto the crossbar by Ben Garratt as the Reds coasted to victory in the end.
Crewe (4-4-2): Garratt; Turton, Guthrie, Nugent, Bakayogo; Inman, Fox, Jones, Cooper; Haber, Hitchcock. Subs: Richards, Ray, Saunders, Ng, Ainley, Kirk, Howell.
Barnsley (4-3-1-2): Davies; Bree, Roberts, Mawson, G Williams; Isgrove, Hourihane, Brownhill; Watkins; Winnall, Fletcher. Subs: Townsend, Scowen, Tuton, Nyatanga, Chapman, Smith, Khan.
Referee: Sebastian Stockbridge (Tyne & Wear).