A huge amount of energy in gasoline is wasted as heat. About 70%. Electric plants lose much less energy due to reusing the heat fairly efficiently. There are some losses due to power transmission there of course. Keep in mind some electricity that ends up in cars would/should come from renewable sources...
http://www.fueleconomy.gov/feg/atv.shtml