On cloudy days there's not going to be enough sunlight for solar panels to supply the energy your home needs. So even if you have a photovoltaic (PV) system, you're going to need another power source.
If you want to stay off the grid completely, you can always use a backup generator. Otherwise you can connect to the utility grid and just buy power when you need it. You can even sell power back to the utility company if your panels produce more than you need. You'll have to look into government regulations in your area, though. Your utility company might not participate in this kind of program, and buyback prices vary. In addition, special equipment is required to make sure the power you're selling is compatible with the power the utility company uses. Finally, you'll need something called an anti-islanding inverter, which prevents PV systems from feeding electricity into power lines that have gone out in a power failure. This could be a potentially deadly situation for linemen who come to fix the power lines.
Your third option for backup power is to use batteries. These will need to be maintained and replaced every few years, and the cost can really add up. Using batteries in your PV system can be very dangerous because they contain so much energy as well as acidic electrolytes. You'll have to keep them in a well-ventilated and nonmetallic enclosure. You'll need to use deep-cycle batteries, which discharge a small current for a long period of time (like in a power failure or at night), as opposed to shallow-cycle batteries (like the ones in your car), which discharge a large current for just long enough to start the car and then recharge as your drive. The deep-cycle batteries that are most commonly used are nickel-cadmium batteries and (vented and sealed) lead-acid batteries.