Preheat your oven to 350°F (175°C). Grease and flour two 9-inch round cake pans. Line the bottoms with parchment paper for easy removal.
In a large bowl, whisk together the flour, baking soda, salt, cinnamon, ginger, nutmeg, and cloves. Set aside.
In the bowl of a stand mixer fitted with the paddle attachment, beat the granulated sugar and vegetable oil on medium speed until well combined and slightly fluffy, about 2 minutes. Add the eggs one at a time, beating well after each addition. Stir in the vanilla extract.
With the mixer on low speed, gradually add the dry ingredients to the wet ingredients in three additions, alternating with the buttermilk in two additions, beginning and ending with the dry ingredients. Mix until just combined; do not overmix. A few streaks of flour are okay.
Gently fold in the grated carrots and chopped nuts (if using) by hand using a spatula until evenly distributed.
Divide the batter evenly between the prepared cake pans. Bake for 30-35 minutes, or until a wooden skewer inserted into the center comes out clean. Let the cakes cool in the pans for 10-15 minutes before inverting them onto a wire rack to cool completely.
While the cakes cool, prepare the frosting. In the stand mixer bowl (cleaned), beat the softened cream cheese and butter on medium speed until smooth and creamy. Gradually add the sifted powdered sugar, mixing on low speed until incorporated. Add the vanilla extract, cinnamon, nutmeg, and cloves, and beat on medium-high speed until light and fluffy.
Once the cakes are completely cool, place one layer on a serving plate. Spread a generous layer of frosting over the top. Carefully place the second cake layer on top and frost the top and sides of the entire cake. Decorate with extra nuts if desired.