Gillingham dropped into the bottom four after losing to high-flying Barnsley.
The visitors took the lead through Keiffer Moore after just 15 seconds at Priestield and they struck again just before the interval.
Cauley Woodrow got his second of the match after the break and although Elliott List pulled one back for the Gills, Jacob Brown fired in a Barnsley fourth..
Billy King was the only change for the Gills, replacing Elliott List, making his full debut, following his loan move from Dundee United.
Barnsley were in good form prior to the weekend match, heading to Priestfield 10 unbeaten and sitting second in the league.
Boss Steve Lovell had warned his team about giving the visitors too much respect, having conceded twice early on in the reverse fixture at Barnsley. But Lovell watched on as the visitors struck inside the first minute.
Connor Ogilvie lost out to Jacob Brown and although Tomas Holy saved well to deny Cameron McGeehan, he couldn’t prevent Moore from tucking home the follow-up.
It was the start of a torrid time for the Gills, grateful on several occasions to Holy, as Barnsley looked to put the game out of sight quickly.
Moore raced clear with five minutes gone but Holy saved well, one on one. Had he looked up, team-mate Mamadou Thiam was all alone and could have had a simple finish into an empty net.
McGeehan shot wide and Alex Mowatt then had two great opportunities. Holy made another great save after Thiam had threaded a great ball through the defence and moments later crashed an effort off the underside of the bar.
Gillingham managed to stay in the game and had a flurry of chances themselves, with Brandon Hanlan heading over and Tom Eaves having a shot saved.
Barnsley always remained a threat, with Holy coming out of his box to dispossess Moore and win a free-kick. Thiam should have done better when a loose ball from Billy King led to him running in at goal, resulting in a poor effort.
The visitors did get a second goal, a minute from the break, when Thiam sent a cross to the back post and Cauley Woodrow was there to head home.
Barnsley’s Jacob Brown headed wide for the visitors after the turnaround and Moore had a shot blocked.
The Gills somehow prevented a third with just over an hour gone. Holy did well to save from Thiam after his first attempt was blocked by Barry Fuller and Max Ehmer then threw himself infront of McGeehan’s shot.
Mark Byrne had a shot at the other end blocked by Mowatt after Brandon Hanlan had forced his way into the box but Barnsley’s third wasn’t far away.
Holy had turned Mowatt’s speculative effort out for a corner but from that set-piece Liam Lindsay got a flick and Woodrow was there at the far post to squeeze the ball home with 71 minutes gone.
Second half sub List reduced the deficit when he struck from just inside the box after Dean Parrett’s free-kick was cleared into his path.
Gillingham had to play the last 10 minutes a man down after Zakuani was forced off following a collision with Moore, with the three subs already used, but the Barnsley man - their leading scorer - left the field on a stretcher and straight to a waiting ambulance.
Barnsley added a fourth goal with Brown smashing in an effort off the underside of the bar.
Gillingham: Holy, Fuller, Ogilvie (Charles-Cook 78mins), Zakuani, Ehmer, Byrne, Rees (Parrett 65mins), Hanlan, King (List 54mins), Eaves, Burke. Subs not used: Hadler, O’Neill, Reilly, Lopes.
Barnsley: Davies, Pinnock, Lindsay, McGeehan, Woodrow (Bahre 72mins), Cavare, Moore (Green 90mins), Pinillos, Thiam, Mowatt (Dougall 80mins), Brown. Subs not used: Walton, Fryers, Hedges, Adeboyejo.
Attendance: 4,791 (786 away)