01 -
Preheat oven to 350°F. Lightly grease a 9x13 or deep 9x9 baking dish with butter and set aside.
02 -
Add olive oil to a medium skillet and heat over medium heat. Add thinly sliced onion, season with salt and pepper. Cook, stirring occasionally, until caramelized to a deep golden color. Remove from skillet and set aside.
03 -
Wipe skillet clean and cook bacon to crisp. Alternatively, bake bacon while onions are cooking to save time. Remove bacon, drain grease, and wipe skillet clean.
04 -
Melt butter in skillet over medium heat. Sprinkle flour on top and whisk to form a roux. Cook for 2 minutes, whisking constantly.
05 -
Gradually whisk in milk, stirring continuously. Bring to a simmer and let thicken for 2 to 3 minutes. Remove from heat and set aside.
06 -
Layer half the potatoes, half the caramelized onions, half the bacon, half the cheese, and half the sauce in the prepared baking dish. Repeat with remaining ingredients.
07 -
Cover baking dish with foil and bake for 1 hour. Remove foil and bake for an additional 30 minutes, or until potatoes are tender when pierced with a fork.
08 -
Remove from oven and allow to cool for 10 minutes before serving.