Gasoline has emissions because when you burn it, it releases CO2 (and others). There are also emissions when the gasoline is produced at the refinery.
Electric vehicles produce no emissions when the electricity is used. In some cases, generating electricity does produce emissions.
The advantage is large powerplants can control emissions much easier than a car and even better - they can be replaced by a cleaner source. Cars usually produce more emissions as they get less efficient with age.
Obviously we're not going to replace everyone's car overnight so we have time to improve our infrastructure.