"plainclothes detective," 1906, from the rubber-soled shoes they wore (which were so called from 1863); from gum (n.1) + shoe (n.).
(Variations: gum boot or gumfoot or gumheel or gumshoe man) A police officer, esp a detective or plainclothes officer: It made him a good gumshoe
[1906+; fr gumshoe, ''rubber-soled shoe'']