Preheat oven to 375 degrees F (190 degrees C). Line a baking dish with aluminum foil.
Cut top 1/3 off garlic heads, exposing the cloves. Place garlic in the prepared baking dish cut side up. Pour olive oil over the garlic and season with salt. Fold up foil and seal to create a tight packet.
Bake in the preheated oven until a paring knife inserts easily into the center of a garlic clove, about 1 hour; set aside to cool. Once cool, remove each garlic clove from the skin. Reserve remaining olive oil.
Increase oven temperature to 400 degrees F (200 degrees C).
Bring a large pot of salted water to a boil; add green beans and cook until bright green and nearly tender, 4 to 6 minutes. Drain beans and transfer to a large bowl of ice water to cool completely; drain well and set aside.
Melt butter in a large skillet over medium heat. Add almonds; cook and stir until lightly browned, 3 to 4 minutes.
Toss green beans, roasted garlic and reserved olive oil, toasted almonds, and 1 tablespoon olive oil together in a large bowl; season with cayenne pepper, salt, and black pepper. Transfer to a shallow baking dish and top with blue cheese.7
Bake until cheese is melted and beans are fully tender, about 15 minutes.