A gremlin is a mischievous folkloric creature invented at the beginning of the 20th century to originally explain malfunctions in aircraft and later in other machinery and processes and their operators. Depictions of these creatures vary widely. Stories about them and references to them as the causes of especially inexplicable technical and mental problems of pilots were especially popular in and after World War II.
Use of the term in the sense of a mischievous creature that sabotages aircraft first arose in Royal Air Force (RAF) slang among British pilots stationed in Malta, the Middle East, and India in the 1920s, with the earliest recorded printed use being in a poem published in the journal Aeroplane in Malta on 10 April 1929. Later sources have sometimes claimed that the concept goes back to World War I, but there is no print evidence of this.
There is however evidence of earlier RAF use in the 1920s to refer to a lowly, menial person, in other words a low-ranking officer or enlisted man saddled with oppressive assignments.