Preheat the oven to 350° F and position the oven rack in the middle of the oven. Spray two 8 inch round cake pans with non-stick spray or cover the bottom and sides in a layer of butter.
In a large mixing bowl, add gluten free flour, baking powder, baking soda, and salt and mix well to combine.
In another large mixing bowl, combine vegetable oil, white sugar, brown sugar, lactose-free milk, vanilla, and cinnamon. Use a whisk to mix well. Add each egg one by one, whisking to combine between each. Stir until smooth and even. Use a spatula to fold in the walnut pieces and grated carrots.
Add the wet ingredients into the dry flour mixture and use a spatula to mix it all together until completely combined and no dry flour remains. Use the same spatula to guide the batter into the prepared cake pans, ensuring each pan has an equal amount of batter. Gently hit the bottoms of the cake pans on the countertop to evenly distribute the batter throughout the pans and remove air bubbles.
Put the pans on the middle rack in the oven and bake for 40 minutes. Remove and allow to cool for 10-15 minutes before unmolding the cakes from the pans. Allow the cakes to cool completely on a cooling rack.
Before frosting - if the cakes have a bit of a dome-shape on top from rising in the oven, trim this off at least one of the cakes (the one that will go on the bottom) to improve structure and support.
How to Make Cream Cheese Frosting: In a large bowl, use an electric mixer on medium-high speed to beat the cream cheese and butter together until they are creamy and smooth, roughly 2 minutes. Reduce the mixer speed to low and gradually add the powdered sugar until well combined. The frosting should be stiff – if it is too loose, add more powdered sugar to increase the stiffness.
Add the vanilla and increase the speed to medium high until smoothly combined, scraping down the bowl as needed.
Cover the bowl and put the frosting in the fridge until ready to use. It will firm up in the fridge, so it may become difficult to spread. Let it stand at room temperature for a few minutes prior to frosting the cake if necessary.
Set one of the cakes on a serving dish. Use a spatula to add a layer of frosting on top of this cake and place the second cake on top. Use the remainder of the frosting to cover the top and sides of the cake. Note: I did not frost the sides of the cake in the photo, but you definitely can!Tip: to smooth the frosting, dip a butter knife in a cup of warm water and gently run it over the top and sides.