It really depends on the kind of gimmick.
Card gimmicks can be made from companies that make custom decks. Usually if you want just one or two decks it's about $30/each, but if they're all the same card that means that the gimmick only cost ~$0.60 to make, great price if you're just going to sell them.
For more advanced gimmicks (i.e. a metal device), try getting a 3d model of what you want made (either yourself, friends, or hiring a freelancer) and sending it to a metal printer for rough production (will be expensive, most likely). Once printed, you can make modifications until perfection and then order in bulk which lessens the price per.
Just some ideas.
EDIT: More thoughts.
For card gimmicks, if you're trying to create a design that works, you can use some of the classic card ink removal techniques (nail polish remover, rubbing alcohol, even a large rubber) and then print your own designs on the face of the card (carefully aligning it on the paper).
For gimmick production, make your own (crude, yet effective) ones out of household items (tape, pens, heat, boxes, plastic, etc) to test design until you're ready to make your own.