The two meanings are believed to have originated concurrently but independently. gunsel: Or: gonsil/ gonzel/ gonsel: A 19th century term of German and Yiddish (little goose) derivation for a young, inexperienced gay male similar to the more recent gay slang term, “twink.” See sodomite for synonyms.
The latter usage — a gun-toting hoodlum — derives from Dashiell Hammett’s The Maltese Falcon. Hammett’s publisher at the time refused to allow any rude or profane terminology in his publication. Hammett slipped in “gunsel” — a street term for a young, gay man — as a joke. Since it is used throughout the book to refer to the character of Wilmer — a gun-toting thug — most people erroneously assumed that is what it meant and it stuck.