Preheat oven to 375°F (190°C). Grease a 9x13-inch baking dish.
In a large bowl, combine potatoes, onion and bacon.
In a medium saucepan over medium heat, melt butter. Whisk in flour, garlic powder and onion powder until smooth. Gradually whisk in chicken broth and cream until thickened. Stir in cheese until melted.
Pour cheese sauce over potato mixture and stir to combine. Transfer to prepared baking dish.