The original gremlins were a sort of urban legend among Royal Air Force pilots in WWII who encountered random inexplicable mechanical difficulties with their aircraft (especially among the high altitude recon units). The earliest printed mentions of the RAF Gremlins occurred in an article in the Royal Air Force Journal on April 18,1942 by Hubert Griffith, however accounts of similar occurrences go back to the spitfire pilots of the Battle Of Britain as early as 1940, but no printed evidence exists. At first the Gremlins were believed to have enemy sympathies, however later with reports of enemy planes suffering similar problems they were thought to simply be pranksters.
Roald Dahl a former RAF pilot upon retiring wrote a novel entitled The Gremlins published in 1943. In 1942 the Disney got a hold of the manuscript and considered using the material for a film, however that fell through and a short film entitled Falling Hare (featuring Bugs Bunny) was conceived instead.
The Mogwai are a variation on the myth which were featured in a hit comedy horror film entitled Gremlins, and it's sequel. The Mogwai are actually a creature from Asian mythology believed to be minor demons who enjoy harming humans that reproduce after/during the coming of a rain. However, in the film Gremlins/Mogwai are evil malicious tricksters with the Mogwai being the adolescent form of the Gremlins and they reproduce by getting wet. To become a Gremlin a Mogwai has to eat after midnight and it will undergo a change. Most Gremlins and Mogwai are evil and vicious with Gizmo and a few others being exceedingly rare exceptions and very sweet.