1. Preheat oven to 350°.
2. Combine 2 tablespoons butter and brown sugar in a small saucepan over medium heat, stirring until melted and smooth. Spread brown sugar mixture into bottom of a 9-inch square metal baking pan coated with cooking spray and lined with parchment paper.
3. Drain pineapple, reserving 1/4 cup juice. Top brown sugar mixture with pineapple slices.
4. Weigh or lightly spoon flours into dry measuring cups; level with a knife. Combine flours, baking powder, and xanthan gum, stirring with a whisk. Combine milk and reserved 1/4 cup pineapple juice in a small bowl.
5. Place 4 tablespoons butter and granulated sugar in a large bowl; beat with a mixer at medium speed until light and fluffy. Add vanilla and eggs; beat until blended. Add flour mixture and milk mixture alternately to sugar mixture, beginning and ending with flour mixture, stirring until combined.
6. Pour batter evenly over fruit. Bake at 350° for 40 minutes or until a wooden pick inserted in center comes out clean. Immediately invert cake onto a serving platter. Cool 1 hour.