Gluten formation in cake dough
Gluten development is not something you need for a cake to rise, excess gluten development in a cake leads to a tough cake, dense cakes are usually caused by a different reason. With a carrot cake my first thoughts would be:


Too much moisture: carrot and other vegetable cakes can get very wet due to the moisture in the vegetables added, an overly wet batter (not enough flour and sugar to balance it out) can lead to a dense cake. You can dry the carrot a bit before using it to reduce this, or add a tad more flour
Underbaked: one common mistake new bakers make is baking to a recipe time rather than a result, if you bake a cake for 45 minutes that doesn't necessarily mean it is done, that time is a guideline. When you bake a cake the batter dries and crystallizes, trapping the air, if you underbake it this lattice isn't completely formed and it loses the air - you see this massive oven spring and then the whole thing collapses. The skewer test method isn't very reliable, next time keep baking until the cake springs back then you press it with a finger on top. I personally use that method and back it up with temperature measurements made with an instant read thermometer. A heavier cake like a carrot cake is done when it reads over 200&deg;F (94&deg;C), lighter cakes would want a higher temperature, closer to 210&deg;F (99&deg;C)