Martin opened the scoring for the Gills, who also knocked the Glovers out of the Capital One Cup on Tuesday, with a 20-yard free-kick following Nathan Smith's foul on Kedwell.
Smith then brought down Aaron Morris in the box 1-0 minutes into the second half, and Kedwell finished at the second attempt after Chris Weale parried his penalty.
Weale had earlier made a quick-fire double save to deny Leon Legge, and Jake Hessenthaler shot over after neat interplay between Doug Loft and Matt Fish.
Goalkeeper Stephen Bywater enjoyed a dream debut for the Gills, as he saved Kieffer Moore's penalty after 17 minutes.
Bywater, who signed on-loan for the Kent side from Millwall on Friday, made easy work of Moore's tame spot-kick.
He also saved well after Ajay Leitch-Smith had dribbled through the Gills' defence, and Moore headed wide from Kevin Dawson's cross as the Glovers slumped to their second league defeat of the season.