Using a stand mixer fitted with the paddle attachment makes getting the perfect cake batter and ultra-smooth frosting completely effortless.
Preheat your oven to 350°F (175°C). Grease two 9-inch round cake pans and line the bottoms with parchment paper to ensure they release perfectly.
In a medium bowl, whisk together the gluten-free flour, baking soda, baking powder, salt, cinnamon, and nutmeg. Set aside.
In the bowl of your stand mixer fitted with the paddle attachment, beat the granulated sugar, brown sugar, oil, and eggs on medium speed for about 2 minutes until smooth, slightly pale, and fully emulsified.
Turn the mixer to low. Slowly add the dry ingredients, mixing just until combined. Stop the mixer and fold in the grated carrots (and nuts, if using) with a rubber spatula until evenly distributed.
Divide the batter evenly between your prepared pans. Bake for 30 to 35 minutes. A toothpick inserted into the center should come out clean. Let them cool in the pans for 15 minutes, then run a knife around the edges and turn them out onto wire racks to cool completely before frosting.
Wash your mixer bowl. Beat the softened cream cheese and butter together on medium-high speed for 2 to 3 minutes until completely smooth and creamy. Gradually add the powdered sugar one cup at a time on low speed, then add the vanilla. Once incorporated, beat on high for 1 to 2 minutes until light and fluffy.