This point comes up often when discussing electric cars. The simple answer is it does depend on what kind of gas car you're comparing with and how clean the electricity supply is where you charge it, but in the vast majority of cases, an electric car generates less greenhouse gas emissions than a comparable gas car. The key number is the carbon intensity of the electrical supply mix, measured in tonnes of CO2 equivalent per GWh of electricity production (or equivalently, g per kWh).
This article suggests that the threshold where electric and gas cars generate a similar amount of emissions is around 500 to 700 tCO2e/GWh. I did a quick calculation comparing a Nissan Leaf with a Prius, and the threshold I came up with was 830. I expect that for larger cars, the emissions from a gas car (and therefore the equivalence threshold) would go up faster than the corresponding emissions from electricity for an electric car, since electric motors are so much more efficient. In any case, it'll vary depending on exactly how you do the calculation but it's in that range.
Where I live, the average carbon intensity for electricity generation is around 35, and at night when I normally charge, it's about 25 - actually less, since these numbers don't factor in distributed solar generation. So an electric car is MUCH better in terms of emissions. This would be true unless you live somewhere that has the majority of electricity production from coal AND the gas car you're comparing with is very efficient. And as others have pointed out, there are lots of people who have even lower-emission electrical supplies.
So the next time someone says electric cars just move emissions to the generation plant, politely educate them!