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 to combine and set aside briefly.
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. Stir until a sticky batter forms.
Cover the bowl with a clean towel and let the batter rise in a warm, draft-free spot for about 30–60 minutes, or until it has roughly doubled in size.
Lightly oil an 8-inch or 9-inch square baking pan using some of the remaining olive oil. Transfer the risen batter to the pan. Using an oiled spatula or oiled fingertips, gently spread the batter into an even layer and press oiled fingertips into the surface to create dimples across the dough.
Drizzle the remaining reserved olive oil over the dough. Sprinkle with 2 teaspoons chopped fresh rosemary, the remaining 1/2 teaspoon salt, and 2 cloves minced garlic if using. Let the dough rest for 15 minutes while you preheat the oven.
Preheat the oven to 400°F. When preheated, place the pan in the oven and bake the focaccia for about 25 minutes, or until the top is lightly golden.
Remove the focaccia from the oven and let it cool for a few minutes (about 5 minutes). Slice into squares and serve warm.