Heimskringla relates that Gandalf was given the kingdom by his father Alfgeir. He fought with Halfdan the Black for possession of it, but in the end they reached an agreement to share Vingulmark between them.
In a later episode, apparently after Gandalf's death, his three sons, Hysing, Helsing, and Hake, attempted to ambush Halfdan the Black at night but he escaped into the forest. After raising an army, he returned and defeated the brothers, killing Hysing and Helsing. Hake fled from the country and Halfdan became king of all of Vingulmark.