While some people do make tiny internal combustion engines the work involved in incredible.
(http://www.youtube.com/watch?v=mLn7xG8vuPQ)
World's smallest V12 engine: (http://www.youtube.com/watch?v=m3KdpzL3Hkk)
Making model IC Engine valves: (http://www.youtube.com/watch?v=Nofj1CGSCM4)
But, being a boy, I wanted it to work better. So I replaced the battery with a lamp cord and plugged it in. It promptly burst into flames. Awesome!
But instead the car got REALLY, REALLY, REALLY fast, shoot out of the track and smashed into the wall.
Of course, I happily put a second car on it, and changed the track so that the car does not end smashed, and indeed, I could launch cars all over the place. Also as the car raced, sparks came out of the contacts with the track.
Now that I am older and know even more physics, I have no fucking idea on how I made a DC motor work only forward with a AC current.
The sparks would come from feeding way too much voltage in, enough to jump the gaps caused by momentary losses of contact between the track and a fast-moving car.
Another possibility is that the motors in the slot cars had electromagnets for the stationary field instead of permanent magnets. That's what an ordinary power drill, especially one without electronic speed control, has. Such a motor will run pretty much the same on AC or DC. When running on AC, the rotor and stator both change their magnetic fields in perfect sync so the net effect is substantially the same as running to same motor on DC.
Wikipedia has an article on "Brushed DC electric motor" with a section on "wound stator". It doesn't specifically mention running the motor on AC, but there's enough there to show you what's going on.
The combustion engine equivalent to the toy electric motor would be a simple stirling engine or even a Hero engine. These can be very easy to build.
http://www.customcdr.com/cgi-bin/ccp51/cp-app.cgi?usr=51H817...
(I've built both kit versions and "from scratch" motors built with parts ratted from cd rom drive motors with a few bucks worth of rare-earth magnets.)
Building your own controller for it is somewhat more challenging…
http://esden.net/2010/09/19/open-bldc-v0-3-hardware-based-cl...
Even in the late 70's the mechanical technician courses in the UK required you to be able to design an old school belt drive.
Compressed air is used because the powerhead is much smaller and lighter than an electric motor (at available voltages) of comparable power. This makes it suitable for handheld tools. Otherwise, compressed air represents a NET loss of energy, and would be avoided.
In any case, compressed air is directly analogous to electricity here. It's a way to transmit energy generated elsewhere.
Gasoline cars were popularized before electric power generation was widespread. It would be decades before the power grid could possibly have supported electric cars.
The Model-T started in 1908 (and there were of course cars before that), the War of the Currents was in the late 1880's. The Model-T represents cars becoming popular, but the War of the Currents was just the beginning of the electric grid.
The first Gasoline car was also around the 1880's (must have been an amazing time to be alive with all those inventions).
It was not until the late 1940's that electricity was widespread, i.e. rural areas which are of course important for long distance travel.
So the electric car would not have been practical until then, and by then of course gasoline was completely entrenched.
Electric cars were the 'good' cars, easier to run, not as dirty or hard to start, more luxurious. But they were an expensive luxury. The Model T was cheap, easy to fix, and adaptable to many other uses (like hooking a wheel to a belt and running a saw to cut wood.) The Model T was a classic disruptive invention: less good but much, much cheaper; it created an entirely new market of car buyers.
It may be that that electric is a better option now: oil is expensive and non-renewable, and burning fuel pollutes. But neither of these reasons were very compelling a century ago.