The first thing to do is to make sure you're using a flour blend that has the right ratio of starch to protein. This makes a big difference in gluten free baking. The best way to do this is to pick a popular gluten free flour. Personally, I like the cup-for-cup flour blends that have xanthan gum in them already. Another thing is to make sure you use the right amount of leavening (baking soda and baking powder), which helps the cake rise and avoids dense pockets.  And lastly, make sure you add the right amount of liquid to your recipe. Gluten free flour typically uses more moisture. The 1:1 flour blends help with this somewhat when converting recipes.