This article is from the alt.usage.english FAQ, by Mark Israel firstname.lastname@example.org with numerous contributions by others.
(notes by William C. Waterhouse)
"Widget" is a deliberately invented word meant (probably) to
suggest "gadget". Most dictionaries fail to trace it to its origin.
It comes from the 1924 play "Beggar on Horseback", by George Kaufman
and Marc Connelly. In the play, a young composer gets engaged to
the daughter of a rich businessman, and the next part of the play
acts out his nightmare of what his life will be like, doing
pointless work in a bureaucratic big business. At one point he
encounters his father-in-law at work, and we get the following
(Father-in-law): Yes, sir! Big business!
---- Yes. Big business. What business are we in?
---- Widgets. We're in the widget business.
---- The widget business?
---- Yes, sir! I suppose I'm the biggest manufacturer
in the world of overhead and underground A-erial widgets.
Part of the point, of course, is that no one ever tells him
what "widgets" are.