If sunlight is blocked the amount of people who die due to starvation from crop failures will probably more than make up for the difference in lost solar power energy. That is to say, we'll have much larger issues than a stable power grid to contend with.
It doesn't necessarily take a full blockage of sunlight. Extreme weather conditions that create multi week collapse in solar outputs is enough to create grid stress, if one is totally dependent on solar and 24hr batteries.
If we directed worldwide LED production all into artificial light for farming, and grew whatever was most calorie-efficient, I think we could theoretically feed every human alive if the sun was blocked out tomorrow.
Obviously that isn't what would happen. The poor would starve whilst the rich still fed cows to eat steak.