In a saucepan over medium heat, melt the butter. Cook the garlic for 30 seconds.
Stir in the flour, and cook for 1 minute. Whisk in the milk, and cook until slightly thickened, 2-3 minutes.
Turn off the heat, and stir in the sour cream. Season with salt and pepper.
Preheat the oven to 350 degrees.
Place the cooked gnocchi in the bottom of a greased casserole dish. Pour the sour cream sauce on top, along with 1 cup of the shredded cheese. Stir to coat. Sprinkle the remaining cup of cheese on top, along with crumbled bacon. Cook for 25 minutes, or until melted and bubbling.
Top with green onions, and serve.