Gnome (Dungeons & Dragons)
In the Dungeons & Dragons fantasy role-playing game, gnomes are one of the core races available for play as player characters. Some speculate that they are closely related to dwarves; however, gnomes are smaller and more tolerant of other races, nature, and of magic. Depending on the setting and subrace, they are often skilled with illusion magic or engineering. Gnomes are small humanoids, standing  tall. Publication history
The gnome is a player character race "often stereotyped as buffoons, illusionists, mad inventors, and many characters play them as intentionally "wacky" or "anachronistic"; a gnome often conforms to the trickster archetype, and is "predisposed towards a "good" moral alignment". Gnomes were originally introduced to Dungeons & Dragons as a new alternative to dwarves, elves, and halflings. They were developed from mythology from a number of different sources, originally being a bearded, short race similar to halflings and dwarves. The gnome's niche in play was made magical, to separate it from the more warrior-like dwarf and the more rogue-like halfling. Dungeons & Dragons
The gnome first appeared in the original 1974 edition of Dungeons & Dragons and in its second supplement, Blackmoor (1975). Advanced Dungeons & Dragons 1st edition
The gnome appeared as a player character race in the original Player's Handbook (1978). The gnome also appeared in the original Monster Manual (1977). A new gnomish subrace, the deep gnome (svirfneblin), was presented as a character race in the original Unearthed Arcana (1985). Another gnome subrace, the tinker gnome (minoi), focused on building mechanical devices, was presented in Dragonlance Adventures. The humorous Solo Quest adventure Gnomes-100, Dragons-0 featured these gnomes in their resistance against the dragon army of Takhisis. Dungeons & Dragons (Basic/BECMI)
The gnome appeared in the Dungeons & Dragons Basic Set as a "monster". The gnome appeared as a player character class in Top Ballista (1989). Advanced Dungeons & Dragons 2nd edition
The gnome appeared as a character race in the second edition Player's Handbook (1989). The gnome also appeared in the Monstrous Compendium Volume One (1989). Four gnomish races – forest, rock, tinker, and deep (svirfneblin) – were detailed as player character races in The Complete Book of Gnomes and Halflings (1993). Dungeons & Dragons 3rd edition
The gnome appeared as a character race in the third edition Player's Handbook (2000), and in the 3.5 revised Player's Handbook. Gnomes were detailed for the Forgotten Realms setting in Races of Faerûn (2003). Gnomes were one of the races detailed in Races of Stone (2004). Throughout D&D history, up to and including the third edition Player's Handbook, spellcaster gnomes were either illusionists or had illusionist as their favored class. However, in Dungeons & Dragons v.3.5, gnomes' favored class has been changed to bard, as the favored class of "illusionist" was a subset of the wizard class. The wizard favored class was also already used by elves. In D&D v.3.5, gnomes are inventors and alchemists who love pranks and excel at engineering. The tinker gnomes of Dragonlance are mechanically skilled, though their devices are quite prone to backfiring. It has been suggested that gnomes be given the Eberron class artificer as a favored class, due to their technical aptitude. Dungeons & Dragons 4th edition
Gnomes appeared in 4th edition as a player character race in Player's Handbook 2 (2009). The gnome appeared in the Monster Manual (2008). Dungeons & Dragons 5th edition
The gnome was included as a player race in the 5th edition Player's Handbook (2014). Two subraces were introduced with it: the forest gnome and the rock gnome. The Player's Handbook connects the rock gnomes to the tinker gnomes of the Dragonlance setting. The deep gnome (svirfneblin) is also referenced in the Player's Handbook, and is fully detailed in the 5th edition Monster Manual (2014). The Elemental Evil Player's Companion (2015) presents the deep gnome as a player race. Subraces
Gnomes in Dungeons & Dragons have been further divided into various subraces:
 Rock gnomes are the standard gnome subrace of Third Edition. They live in burrows beneath rolling, wooded hills. Tinker gnomes are the common gnomes of the Dragonlance campaign setting. In that fictional universe, they dwell in the Mount Nevermind in the world of Krynn. Svirfneblin, or deep gnomes, dwell in cities deep underground. They are more dangerous than the common rock gnome. Forest gnomes are smaller than rock gnomes. They are a shy, secretive folk, living deep in wooded areas. Friends to animals, forest gnomes have a racial ability that allows them to speak with small animals. River gnomes are graceful and quick. They live in homes dug into the side of riverbanks and speak with river dwelling animals in place of burrowing mammals. They are non-magical but gain +1 to initiative and are proficient swimmers. Arcane gnomes are city dwellers. They generally keep to a small community within a larger city. Arcane gnomes are focused on the pursuit of knowledge making their populace, in large part, over-eager inventors or wizards. Chaos gnomes are the most flamboyant gnomes. Brightly colored and rare, they are strongly inclined towards chaos, as their name suggests. Whisper gnomes lack the jovial outlook of other gnome races. Sly and suspicious, they are creatures of stealth. Ice gnomes dwell in the region of  Frostfell in the Eberron campaign setting
 Fire gnomes live on Bytopia, on the Outer Planes, where they help Flandal Steelskin, the Gnomish god of metal and crafting, in his work. Sky gnomes appear in the Creature Crucible - PC2 - Top Ballista published in 1989. They are cunning engineers living in the flying city Serraine above the World of Mystara. In the Forgotten Realms campaign setting, gnomes are also known as the "Forgotten Folk". Society 
Gnome society had changed greatly over the different editions of Dungeons & Dragons. In the first edition, they were portrayed as intensely curious and intellectual, keeping in theme with their spell-casting niche, with an interest in gemstones. They typically lived in hills, and acted as intermediaries between dwarves, elves, and halflings. In the second edition, gnomes received further background. According to The Complete Book of Gnomes and Halflings, gnomes have an intricate society based on their love of all kinds of arts, pranks, and their long lives. Their society is based on art; all gnomes must take up some form of art whether music, painting, cooking, building, or any other form that is considered creative by the time they come of age. Gnomes are naturally friendly, highly social and fun loving people. They are respected by elves for their communion with nature and knowledge of arcane magic, admired by halflings for their humor, and sought out by dwarves for their gemcutting skills. Religion
Garl Glittergold was created by James M. Ward and first appeared in the "Nonhuman Deities" chapter of the original Deities and Demigods  (1980) as the god of gnomes. Roger E. Moore detailed several additional gnomish gods in his article "The Gods of the Gnomes" in Dragon #61 (May 1982), including: Baervan Wildwanderer, god of adventure and thieves; Urdlen ("The Crawler Below"), god of evil; Segojan Earthcaller, god of earth and nature; and Flandal Steelskin, god of metalworking; these four newer gods then appeared in the original Unearthed Arcana (1985). All five of these deities were detailed for Advanced Dungeons & Dragons second edition in the book Monster Mythology (1992) by Carl Sargent, including details about their priesthoods; this book also introduced additional gods including: Baravar Cloakshadow, god of illusions, protection, and deception; Gaerdal Ironhand, god of protection, vigilance, and combat; and Nebelun (The Meddler), god of inventions and good luck. All of these gods also received a very detailed description for their roles in the Forgotten Realms in Demihuman Deities (1998). Further reading

References

Dungeons & Dragons creatures from folklore and mythology
Dungeons & Dragons humanoids
Dungeons & Dragons monsters
Fictional gnomes