Gram was the sword of the first hero of Asgard, Sigurd (the Ever-Glorious), crafted by Regin to slay his brother who had become the dragon Fafnir. But it was Loki, from the future traveling to the past, who manipulated the events that led to it's creation, (with the unwitting assistance of a young Odin) for he needed a powerful sword with it's particular abilities in the future. Once created, Loki had Odin craft him a strong box for it, to hold it until he came for it. It was wielded by Sigurd until he fled Asgard, leaving the sword behind, at which point it was locked away, and later acquired by Loki in the present day.
Powers & Abilities
Gram was at first just a blade of exceptional quality, able to cut an oak tree in a single slice, but being bathed in the blood of Fafnir and wielded by the first hero of Asgard made it even more powerful. It now has the ability to force the truth from any person it cuts, making it impossible for them to lie. It can also reveal truths that person keeps hidden from themselves, forcing them to take a hard look at what they truly are, this allowed Thor to fight off evil corrupting magic when he was stabbed with Gram. It frequently does not kill it's target, even if they are stabbed right through the chest, since the truth usually just hurts, but it is used as a more traditional weapon on occasion as well.