While the etymology of gadget is a bit murky, it's my unschooled opinion that its nautical origin feels the most correct: sailors' slang word for any small mechanical thing or part of a ship for which they lacked, or forgot, a name. [Etymology Online]
Michael Quinion points out that Kipling popularized its use eventually, having probably picked up the term on a few steamer trips to India from attendant sailors.
There's a semantic implication to the original nautical use that I find especially compelling, even if I'm reading too much into it: a "gadget" was something consequential enough to ship function to be desired by a sailor, but not so essential or common that it had a memorable name. It was the sort of thing you were certain would make your life easier, but by its very nature wasn't useful enough for most of its users to remember.
To quote another popular sailing adage from the 1850s: "That's fuckin' deep."