Swansea had lost their last three games against the Gills, but goals from Bayo Akinfenwa and Andy Robinson made sure the jinx was broken.
Akinfenwa opened the scoring in the sixth minute when he nodded home a Lee Trundle cross before substitute Robinson put paid to a Gillingham comeback when he drove home on 72 minutes.
Swans boss Kenny Jackett opted to keep new signing Pawel Abbott - he only entered the fray with 87 minutes on the clock - on the bench having splashed out £150,000 on the Huddersfield Town striker just 24 hours earlier.
Second-half goals by Scott McGleish, Andy Holt and Bradley Johnson enabled Northampton to coast to their biggest win of the season and stretch their unbeaten run to five matches with a 3-0 home win over Millwall.
It was a miserable night for the Lions who never suggested they would be roaring as their four-match winning streak came tamely to an end while midfielder Alan Dunne was shown the red card in the final minute for a foul on Bradley Johnson.
Millwall will feel aggrieved as they led this match 1-0 when it was abandoned 24 days earlier.
Bristol City booked their place in the southern final of the Johnstone's Paint Trophy with a 2-0 victory over Brighton at Ashton Gate.Enoch Showumni and Wayne Andrews scored either side of the break for the Robins, who will play either Bristol Rovers or Shrewsbury Town - whose match on Tuesday was postponed due to a waterlogged pitch at Gay Meadow - for a place in the Millennium Stadium final.