Second half goals from Ryan Johnson and Junior Morias sealed the points for the visitors, a week after Margate had lost by the same scoreline to league leaders Maidenhead United.
Early in the second half Margate were controversially denied an opener as Victor Adeboyejo rounded James Russell and slotted home, only to be denied by a harsh looking offside call.
Their frustration was doubled a minutes later when St Albans took the lead, as Johnson flicked Tom Bender’s long throw through a crowd and into the far corner.
Margate came close to an equaliser late in the game when Tarik Moore-Azille collected a corner but could only turn the ball into Russell’s arms from four yards.
Both teams traded efforts off the woodwork, as first Louie Theophanous smashed against the crossbar for the visitors. Substitute Jermaine Osei then came agonisingly close to bringing his side level only to see his low effort cannon back against the post.
Margate were sucker punched late in the game, when St Albans broke quickly and found Morias in acres of space in the box, who comfortably slotted home to wrap up the points.
Margate: Pajetat, Taylor, Fox (Williams 89), Phipps, Johnson, Moore-Azille, Richefond, Donnelly (Osei 73), Adeboyejo, Akindayini, Banya (Rowland 89). Subs not used: Henly, Foster.
St Albans City: Russell, Herd, Bender, Chappell, Hill, Johnson, Lucien (Cureton 69), Thomas (Montgomery 53), Theophanous, Morias, Noble (Ball 89). Subs not used: Iwelumo, Martin.
Man of the Match: Valerie Pajetat (Margate)