We solved this problem once before - with fossil fuels. The answer is simply to have more capacity on hand than demand. We can do the exact same thing with alternative energy.
The difference is only that alternative energy doesn't have an "off" button, so we simply have to assume that, given a source of alternative energy, EG: a windmill, that we won't necessarily use all of its capacity. If we built gobs and gobs of windmills and solar panels, and installed them in such a way that not all their potential output is used all the time, we have a stable power grid.
The only difference is that the "off" button has to work differently. EG: a solar panel installation could dump unused power to a heating element or something. If power companies were smart enough to "get out in front" of this problem, they'd switch to the business of transporting power, which includes managing demand.
Unfortunately, power companies are run by myopic trolls, so I'm not expecting this business transition to go smoothly.