Preheat your smoker to 225°F (107°C).
Cook the elbow macaroni according to package instructions; drain and set aside.
In a large pot, melt the butter over medium heat.
Stir in the flour and cook for 2 minutes to form a roux.
Gradually whisk in the milk, cooking until thickened.
Add garlic powder, onion powder, salt, and pepper; stir to combine.
Remove from heat and stir in the cheddar and gouda cheese until melted.
Fold in the cooked macaroni and crumbled bacon.
Transfer the mixture to a smoker-safe dish.
Smoke for 30 minutes, stirring halfway through for even flavor.