1926 (in Maine & Grant's "Wise-Crack Dictionary," which defines it as "a device used for making a fair game crooked"), Amer.Eng., perhaps an alteration of gimcrack, or an anagram of magic.
Arbitrary bit of equipment
Gimmick was a term used in telegraphy in a similar way we might use the term gadget today for an arbitrary bit of equipment: a thingy, a wotsit, thingymajig, doodah or gromit.
From the September 1925 Popular Mechanics:
STRANGE "LINGO" OF LINEMEN IS PUZZLE TO HEARER
"Grab the dinkey and dolly to see if the grunt has the deadman handy to get the stick." A Kansas telephone subscriber overheard the above order spoken by the lineman of a crew at work on an installation job. Puzzled, he appealed to the information bureau of the public-service companies and the words were interpreted to him as follows. A "dinkey" is a small art used to carry the poles which are called "sticks," the dolly" is the board fitted with a roller for handling them and the "deadman" relates not to to funereal matters but to the forked tool which is used in hoisting poles into position. The "grunt" or the "ground hog" is the lineman's helper who supplies tools or materials, any such article being denoted by the term "gimmick."
A 1925 Telephony snippet repeats these terms:
It is his duty to keep the lineman supplied with materials and to look after his tools, and the term generally used for any tool or piece of material is gimmick.
From a 1921 Telegraph and Telephone Age snippet:
... fully remove the speaking-hearing gadget from its spider-leg forks, untwisting some fathoms of cord from around the box and beneath your feet. You next select a comfortable chair, adjust the aforesaid gimmick to ear and — .
" 'Allo,' you say, engagingly.
" 'Allo,' again. 'Captain HELL-O' you rage...
You suddenly discover that you've been holding the wrong end of the gimmick to your ear.
There's a possible 1910 in a snippet of Domestic engineering and the journal of mechanical contracting: Volume 50:
In a hotel at Muscatine, Iowa, the other day I twisted the gimmick attached to the radiator, with the intention of having some heat in my Nova Zemblan booth. The caloric began to percolate very audibly, and for an hour or so the outfit ...
It was also used meaning a betting trick in the 1922 book Picking winners with Major Miles by L. B. Yates:
"Now if yo' will accompany me to my apartment I will introduce yo' to th' real gimmick of th' game. "
I'm stretchin' a point in this mattah," the Major went on as the man from Nodville entered his room, "because I'm goin' to disclose to yo' a secret system which is absolutely my own and one that I rarely divulge excep' to my most intimate friends. ..."
"Go on, go on," growled the book-maker wrathfully ; "go on and hand that to some one else. You
tossed me in th' air, an' worse than that you made
a hick out of me to th' rest of th' bumch, because
when th' play came in on this horse I passed round
th' information you handed me as th' real gimmick. ..."
Mechanical thing that could also be used for trickery
James Malcolm Bird's 1925 book on "Margery" the Medium has the following snippet about Houdini, which seems to mean a mechanical thing that could also be used for trickery:
convinced him that the cage possessed a "gimmick" of some sort; but, like me, he had no idea what the trick was, or even in what direction it pointed. But he continually urged Comstock to insist upon committee examination of the cage; and Comstock, in recognition of Houdini's formidable and unscrupulous ...
A person who labels everything
A January 1925 Time Magazine has another meaning entirely:
A "gimmick" is a person who puts a price tag on everything he sees and a label on everything he thinks. Most musicians pride themselves on not being gimmicks. To differentiate themselves from this clan, they wear their hair longer; their neckties, their phrases, are more picturesque. The only criticism they fear is the accusation that they fear criticism, that they are trying to make themselves as gimmicks are. Not so Vincent Lopez, famed jazzbo. Music, he says, should ape business. Orchestras should have labels, price tags; the labels should stand for quality....
In two words
Today, it does usually have a somewhat negative connotation. Explained in two words from your Wiktionary link: trick, ploy.