1914, American English underworld slang, from hobo slang, "a catamite;" specifically "a young male kept as a sexual companion, especially by an older tramp," from Yiddish genzel, from German Gänslein "gosling, young goose" (see goose (n.)). The secondary, non-sexual meaning "young hoodlum" seems to be entirely traceable to Dashiell Hammett, who sneaked it into "The Maltese Falcon" (1929) while warring with his editor over the book's racy language:
"Another thing," Spade repeated, glaring at the boy: "Keep that gunsel away from me while you're making up your mind. I'll kill him."
The context implies some connection with gun and a sense of "gunman," and evidently that is what the editor believed it to mean. The word was retained in the script of the 1941 movie made from the book, so evidently the Motion Picture Production Code censors didn't know it either.
The relationship between Kasper Gutman (Sidney Greenstreet) and his young hit-man companion, Wilmer Cook (Elisha Cook, Jr.), is made fairly clear in the movie, but the overt mention of sexual perversion would have been deleted if the censors hadn't made the same mistaken assumption as Hammett's editor. [Hugh Rawson, "Wicked Words," 1989, p.184]