I'm not sure what to make of the following lengthy slang history of gig from Harold Wentworth & Stuart Flexner, Dictionary of American Slang (1960), but it's certainly interesting and unexpected:
gig n. 1 A child's pacifier or any object, as a cloth square, spoon, or the like, used as a toy; any object to which a small child is attached and with which he likes to play; any object treated by a child as a fetish; a gigi or ju-ju. Orig. Negro slave and Southern use. From "gigi," the word is very well known to about 35% of the population, unheard of by the rest. 2 [sometimes taboo] The rectum. From "gigi." Used euphem. by some children, as part of their bathroom vocabulary, but not common to all children. Used by some male adults [taboo] as a euphem. for "ass" in such expressions as "up your gig." 3 [taboo] The vagina. From "gigi." Not common. Prob. Southern use. 4 A party, a good time; esp. an uninhibited party; occasionally but not often, an amorous session, necking party, or even a sexual orgy between a man and a woman. c1915 [1954]: "Cornet players used to pawn their instruments when there was a lull in funerals, parades, dances, gigs and picnics." L. Armstrong, Satchmo, My Life in New Orleans, 100. 1958: "Life is a Many Splendored Gig," a song title. 5 A jam session ; a jazz party or gathering of jazz musicians or enthusiasts. Orig. swing use. 1920 [1954]: "Kid Ory had some of the finest gigs, especially for the rich white folk." L. Armstrong, Satchmo, My Life in New Orleans, 141. 6 Specif., an engagement or job for a jazz musician or musicians, esp. for a one-night engagement. 1950: "If I ask you to go out on a gig, it's thirty-five or forty dollars for that night." A. Lomax, Mr. Jelly Roll, 204. 1954: "On a gig, or one night stand." L. Armstrong, Satchmo, My Life in New Orleans, 221. 7 Something, as a jazz arrangement, that is satisfying or seems perfect. Orig. swing use. 8 A fishing spear; a pronged fork as used for catching fish, frogs, and the like. 1946: [citation omitted]. 9 An unfavorable report; a demerit; a reprimand. Army and some student use since c1940. The relations, if, any, between a child's pacifier or fetish, the rectum and vagina, a party, a sex orgy, jazz music, a pronged fork, and a reprimand are most interesting, and lie in the field of psychology rather than of etymology.
The second edition of Wentworth & Flexner (1975) repeats this definition word for word, but the the third edition, which is essentially a completely new book, cuts back on the early definitions. From Robert Chapman & Barbara Kipfer, Dictionary of American Slang, third edition (1995):
gig 1 n jazz musicians by about 1915 A party for jazz musicians and devotees; =JAM SESSION [citation (the Kid Ory quote again) omitted] 2 n jazz musicians by about 1905 A playing date or engagement, esp a one-night job [citations omitted] 3 v [citation omitted] 4 n 1950s Any job or occupation [citations omitted] 5 n A criminal act; swindle; =JOB, SCAM [citations omitted] 6 n Armed forces by 1940s A demerit; report of deficiency or breach of rules [origin unknown; musicians' senses are extensions of earlier meanings "spree, dance, party," found by 1777]