The Bluebirds made seven changes from the side that lost to Tottenham on Tuesday, while Brandon Bingham dropped out for the Gills to be replaced by the aforementioned List.
Neil Warnock's side were the better team early on, Joe Bennett seeing a decent effort save by Tomas Holy following a swift move down the left while Sean Morrison also saw an effort blocked by the Czech.
The Gills struggled to settle with Tom Eaves becoming increasingly isolated up front but grew into the game.
Eaves was almost picked out by Bradley Garmston from the left, while he also saw a header go over shortly before the break.
However, the sides went in goalless at the break but that late burst gave the home side confidence, regularly breaking but failing to test visiting goalkeeper Alex Smithies.
There were a couple of goalmouth scrambles at either end, while Nathaniel Mendez-Laing had a couple of decent efforts, the best of which saw him cut in from the right, totally wrong-footing Connor Ogilvie but his effort was wide.
The 26-year-old also hit the bar but it was Gillingham who made the breakthrough on 81 minutes.
A long ball forward found Eaves and he kept his head, rolling back to List on the edge of the area and the 21-year-old struck home from the edge of the area.
Cardiff pushed and probed but to no avail, with veteran Gabriel Zakuani leading his defence to a clean sheet as League One Gillingham claimed their first win over a Premier League side since Charlton.