Where does “gam” come from?

Words derived from “gam