The world is hopping on the electric bandwagon. Cities like them because they don't belch soot and other pollution on the road. Owners like them for that sweet kick in the lower lumbar region - electric motors have even more torque than turbodiesels. The climate conscious like them because once the source of electricity is also weaned off fossil fuels, their carbon emissions will be very low.
Right now, though, we are in a transition period: while renewable energy is starting to make inroads, the fact is that it still makes up a small fraction (single digit percentages) of the world's electricity supply. And how clean your electricity is depends largely on where you live.
The total carbon emissions from your car must also include the emissions from its manufacture. Apples-to-apples comparisons are very hard to come by, but there is one car that has three different incarnations: the Renault Fluence was, for a time, available in gasoline, diesel and electric versions (no hybrid). So the cars are identical except for their engines and drivetrains. Renault has done a lifecycle analysis for the three versions (PDF file).
Manufacturing the electric car makes more carbon emissions than the gas or diesel versions - this is often pointed out by dectractors of EVs. However, over the lifetime of the car (defined in the study as 150,000 km or roughly 100,000 miles), the electric car has significantly lower emissions than either of the fossil fuel propelled ones.
How much lower the emissions are depends on what generates the electricity you power it with: Running the Fluence in the UK, where coal and gas make up most of the utility power, the total lifetime emission is nearly twice as high has in France, which gets the majority of its power from low-carbon nuclear plants.
For the United States, the great folks at Climate Central have built a beautiful interactive that shows the car with the lowest emissions for your specific state. For fossil fuel intensive states, the most climate-friendly car is not necessarily all-electric!
As a caveat: these numbers take the average emissions from all utilities in your state.
Here's a vision of the future: If your house is powered by all-renewables, whether from your rooftop solar, or because you bought "clean" electricity through renewable energy certificates, then the lifetime emissions of your car is just the emissions from making it. On the graph above, that would be a horizontal line between 0 and 150,000 km. Once manufacturers find a way to make the car using zero carbon energy, the sum total of emissions would be zero.