Preheat the oven to 375 ̊F (190 ̊C, or gas mark 5). Bring a pot of water to a boil and cook pasta according to box (make sure you don't overcook the pasta!)
In a saucepan, melt the butter and add the minced garlic, salt, and pepper over medium-low heat. Cook until the garlic is fragrant, 60 seconds . Add the gluten-free flour and cook for another minute. Stir in the milk and heat until thickened, 5 to 6 minutes. Remove from the heat and add half (3 ounces) of the cheese.
In a 9 by 9-inch (23 by 23 cm) baking dish (or its equivalent), combine the pasta with spinach then pour the cheese sauce over, stirring until well combined. Top with the remaining half of the cheese. Bake for 35 to 40 minutes, until the cheese is bubbling and golden brown on top.