Wheat flour acts as a binder in recipes and gives cakes and cookies, the gluten gives doughs and batters structure. Broadly speaking, if a recipe has just a small amount of wheat flour, such as 2 to 4 tablespoons (20-40 g), you can often just swap out another flour. I like flours such as buckwheat, chestnut, quinoa, corn, and oat flours, because they are “natural” tasting and go well with most other flavors and ingredients used in baking. Note that some of those flours may be processed in a facility that processes wheat flour, so always check and make sure that the flours you are purchasing are gluten-free, especially oat. Other substitutions include nut flours (also called nut “meal”) as well as corn and potato starch.
Also, here's two suggestions for buying gluten free flour.
Gluten Free All-Purpose Baking Flour by Bob's Red Mill and Gluten Free Multi Purpose Flour by King Arthur Flour.
Read the rest of this post to learn how to make your own gluten free flour and what other substitutions.