A gizmo is
a gadget, especially one whose name the speaker cannot recall.
Synonyms might be "thingamajig" or "whatsit" (colloquially).
A gadget is
a small mechanical device or tool, especially one that is ingenious or novel.
Smallness is one of the defining characteristics, so a new type of earth-moving equipment is not likely to be called a gadget, however ingenious or novel it may be, but a pen that doubles as a voice recorder certainly would be.
A gimmick is merely a trick, usually used to attract attention or publicity. A gimmick does not have to be a mechanical device. This is the "black sheep" in your list.
Device is a bit broader:
1 a thing made or adapted for a particular purpose, esp. a mechanical or electronic contrivance : a measuring device.
• an explosive contrivance; a bomb : an incendiary device.
• archaic the design or look of something : works of strange device.
2 a plan, scheme, or trick with a particular aim : "writing a public letter is a traditional device for signaling dissent."
• a turn of phrase intended to produce a particular effect in speech or a literary work : a rhetorical device.
3 a drawing or design : the decorative device on the invitations.
• an emblematic or heraldic design : their shields bear the device of the Blazing Sun.
(Above definition taken from Webster's.)