Our homemade green bean casserole is made from scratch, starting with fresh green beans tossed in a creamy sauce. The sauce is super flavorful, thanks to mushrooms and melty cheese. Then, to take this casserole over the top, we add lots of homemade crispy shallots right before serving.
1 ½ pounds (680g) green beans, snipped and cut in half
1 pound (450g) crimini mushrooms, finely chopped
6 tablespoons (85g) butter
3 cloves garlic, minced, about 1 tablespoon minced
2 medium shallots, thinly sliced
1/2 cup (120ml) dry white wine, see notes
2 tablespoons (16g) all-purpose flour
2 cups (470ml) whole or reduced-fat milk
2 cups shredded (8oz or 225g) Gruyère cheese, see notes
1/2 teaspoon (3g) fine sea salt, or more to taste
Homemade fried shallots or store-bought fried onions
Preheat oven to 350°F (176°C).
Bring a large pot of salted water to a boil. Add green beans and cook for 5 minutes. Drain and rinse under cold water to cool. Set aside.
Melt butter in the pot used to cook the green beans over medium heat. Add mushrooms, garlic, and shallots. Cover and cook for 30 minutes, stirring occasionally. Reduce heat if the vegetables begin to brown too quickly.
Add white wine and cook, uncovered, until almost completely reduced.
Stir in flour and cook until no longer lumpy.
Gradually whisk in milk and bring to a simmer.
Stir in cheese until melted and the sauce is smooth. Season with salt to taste, starting with 1/4 teaspoon.
Add cooked green beans to the sauce and toss until well coated. Transfer the mixture to a casserole dish.
Bake for 20 to 25 minutes, or until the sauce is bubbling around the green beans.
Let the casserole rest for 5 to 10 minutes after baking. Top with crispy shallots just before serving (adding them too soon can cause the shallots to steam and turn soggy).