For the co2 equivalency analysis you really need to compare the total GHG byproduct of the production of each entire car and their fuels. The EV has a battery which is energy intensive to produce, but some of that would also be required to build and engine/transmission etc.
and extracting oil and turning it into gasoline and delivering it has GHG byproducts, as well as producing and delivering electricity.