In a small bowl, combine 1 1/2 cups warm water (110°F–115°F), 1 tablespoon sugar, and 2 1/4 teaspoons instant yeast. Stir lightly and let sit 5–10 minutes until the mixture is slightly foamy.
In a large bowl, whisk together 2 1/2 cups gluten-free all-purpose flour blend (with xanthan gum), 1 1/2 teaspoons baking powder, and 1/2 teaspoon of the salt.
Add the yeast mixture and 2 tablespoons of the olive oil to the dry ingredients. Stir with a spatula until a sticky batter forms, scraping the bowl sides as needed.
Cover the bowl with a clean towel and let the dough rise in a warm, draft-free spot until it has roughly doubled in size, about 30–60 minutes.
Reserve the remaining 1 tablespoon olive oil (for oiling the pan and topping). Lightly oil an 8-inch or 9-inch square baking pan with some of the reserved oil.
Transfer the risen dough into the prepared pan. Using an oiled spatula or oiled fingertips, gently spread the dough into an even layer. Press oiled fingertips into the dough to create small dimples across the surface.
Drizzle any remaining reserved olive oil over the dough. Sprinkle with 2 teaspoons chopped fresh rosemary, the remaining 1/2 teaspoon salt, and 2 minced garlic cloves if using.
Let the dough rest for 15 minutes while you preheat the oven to 400°F.
Place the pan in the preheated oven and bake the focaccia about 25 minutes, or until the top is lightly golden.
Remove the focaccia from the oven, let it cool for a few minutes in the pan, then slice into squares and serve warm.