Preheat oven to 325 degrees F.
Rinse beets well. Cut off the greens, then cut the leaves off the stalks. Set the leaves and stalks aside. Remove excess papery skin from garlic head without separating the cloves, then cut the head in half horizontally.
Toss the beets, garlic, 2 tablespoons oil and 1/2 teaspoon salt in a small baking pan, such as a bread pan. Cover with foil. Roast until tender, 1 to 1 1/4 hours. Let cool slightly.
Whisk vinegar and sugar in a medium bowl. Squeeze the garlic cloves out of their skins into the bowl. Peel and dice the beets; add to the bowl. Let marinate at room temperature for at least 2 hours and up to 1 day.
Finely chop the beet stalks and very thinly slice the greens; place in a large bowl. Scoop the beets from the pickling liquid with a slotted spoon and add to the bowl. Drizzle the beet mixture with 1/4 cup of the pickling liquid. Add walnuts, onion, dill, the remaining 2 tablespoons oil and 1/4 teaspoon salt and gently toss to combine.