Preheat oven to 375°F (190°C). Grease a large baking dish.
In a large saucepan, melt butter over medium heat. Add diced onion and garlic, sautéing until softened and fragrant, about 5 minutes.
Stir in flour and cook for 1-2 minutes to form a roux, stirring constantly to remove the raw flour taste.
Gradually whisk in milk and chicken broth. Continue stirring constantly until the sauce thickens, about 5-7 minutes.
Season the sauce with 1/2 teaspoon salt and 1/4 teaspoon pepper. Remove from heat.
Layer half of the sliced potatoes in the prepared baking dish. Pour half of the thickened sauce over the potatoes. Season lightly with additional salt and pepper.
Repeat with the remaining potatoes and sauce, spreading the top layer evenly.
Cover the dish tightly with foil and bake for 45 minutes.
Remove the foil and bake for an additional 30 minutes, or until the potatoes are tender when pierced with a knife and the top is golden brown.
Let stand for 10 minutes before serving to allow the sauce to set.