as quoted on www.wordorigins.org
"This brings us to the most common sense, that of a musician's engagement or job. The musical sense dates to 1926 and first arose as jazz slang in the US. But the origin is not in music. The use of gig to mean a non-musical job or occupation dates to 1908, and the sense of a business affair or event is a year older than that. The origin is unknown, but it may come from the slang term gag. This dates to 1890 and means business method, practice, or behavior. All these sense are American slang usages."