Just going by memory of usage pattern:
Gadget: a small (at least usually small enough to be carried around and utilized by a single person) piece of technology for a specific, often niche use. Eg, "go go gadget shark-repelant spray gun!"
Contraption: a device, often jury rigged or prototyped, built to serve some particular purpose. Eg, "I built this here contraption to dig us a way out of here"
Doohickey: A word used refer to a contraption or other piece of technology that the speaker does not understand, or does not know the purpose of, especially to emphasise that lack of understanding. Eg, "they're gonna 'beam' us out of here with that doohickey."
Not sure about gizmos.
Edit: examples