Origins of Gungnir
Many of us recognize Odin, the chief god of Germanic mythos, by way of legends and, in recent times, by comic books and superhero films. His reputation as "father of the slain" attracted the seafaring raiders we know as Vikings.
Odin and his wondrous weapon appears in every body of folklore inspired or influenced by Germanic culture. He is sometimes called Wotan, and sometimes bear the title "All-father".
It was only fitting that such a mighty being wield an equally powerful weapon. Odin's spear, Gungnir ("swaying one"), never missed its mark: the spear possessed flawless balance, performing with unerring precision no matter who wielded it.
Even though cinema adaptations show Odin firing blasts of energy from the spear, very few references of such a use appear in mythology; a majority of accounts involving weapons serve to demonstrate Odin's magic and power rather than that of an object.
According to one Icelandic legend, Odin provoked a war with the Vanir (gods of a foreign domain) by throwing Gungnir over their heads.
Viking fighters sought unerring death for their foes, developing a ritual based on this tale: prior to battle, custom demanded that warriors hurl a spear into the sky above the enemy to invoke Odin's blessing.
In the Hands of Odin
Gungnir was the work of dwarves called the "sons of Ivaldi", great craftsmen responsible for forging multiple divine artifacts. When the mischievous Loki snipped the golden locks from Sif's head, she was distraught--and so was the thunder god, Thor.
To rectify the situation, Loki visited the talented dwarves and asked them to weave a golden wig for Sif. Thinking to impress and ingratiate the gods, the sons of Ivaldi also fashioned Gungnir for Odin.
The shaft bore wood from Yggdrasil, a sacred tree representing cosmic power and knowledge. Odin etched runes and spells into the wood, although Icelandic lore reveals that he carved runes on the spear point and not on the shaft.
In some tales, the runes represent contracts that Odin has made in pursuit of knowledge and wisdom, a pursuit he engaged in with little regard for his own life or limb.
Despite his cosmic knowledge and magical power, Odin cannot stop the Ragnarok: the preordained doom of the gods is inevitable, no matter how many spells Odin carves into his spear, or what he sacrifices for wisdom.
During the final battle, Odin dies and Gungnir vanishes from mythological record.
Enchanted weapons played a large part in subsequent legends (King Arthur's Excalibur, for example), and continue to influence modern fantasy writers.