Preheat oven to 350°F (175°C). Grease and flour a 9x13 inch baking pan.
In a large bowl, combine flour, sugar, baking powder, baking soda, cinnamon, and salt. Stir in the grated carrots.
In another bowl, beat the eggs, oil, and vanilla. Stir into the carrot mixture until well combined. Pour into the prepared pan.
Bake for 30 minutes or until a toothpick inserted into the center comes out clean. Let cool completely.
For the frosting, beat together the cream cheese and butter until smooth. Gradually add powdered sugar and vanilla, beating until fluffy.
To assemble the trifle, cut the cooled carrot cake into cubes. In a trifle dish, layer the cake cubes and cream cheese frosting. Repeat layers until the dish is full, ending with frosting on top.
Chill in the refrigerator for at least 2 hours before serving.