From 横(よこ) (yoko, “side”) + 髪(かみ) (kami, “hair”). The kami changes to gami as an instance of rendaku (連濁)..
横(よこ)髪(がみ) • (yokogami)