CO2 + 3H2 ➝ CH3OH + H2O
Assuming low-carbon electricity at $75/MW, electrolysis delivers hydrogen at $5/kg and the production of methanol in an $98 MM facility (or $128K per tonne of daily production for an 850,000 tonnes/yr boiler plate — and 800,000 actual tonnes/yr facility) should come to $1,000/tonne or $2.91/gallon of methanol. While process improvements are possible, this base case estimate employs commercially deployed equipment. Current high-CO2 emission methanol costs about $50/tonne according to Lurgi.
Since methanol is typically considered to have ~60% of the energy value of gasoline in automotive use this comes to $4.64/gallon of gasoline equivalent. Were the methanol then to be converted to either DME or gasoline, the cost per gallon would approximately double, and the attendant CO2 emissions would also need to be managed.