Obviously gas stations came after the car, as there would have been no one to sell to. How did people fuel their early cars? We're the first gas stations revolutionary?
The Hit-and-Miss engine came into use circa 1900. It was an amazingly simple device, compared to a modern engine. There was no float bowl in the carburetor- just a needle valve to control the flow of gas into a venturi at the air intake. Cooling was provided by having a tank of water around the cylinder- dump more in when it boiled away. There was an open crankshaft- just oil it regularly. A flywheel stored the energy, and also tripped the ignition switch. The hit-and-miss was because of the governor: at the set speed the exhaust valve is held open, letting air in and out, only closing when the speed drops. So the engine under low load only hits once out of every several revolutions of the flywheel.
They were far easier to utilize than steam engines, less complex, lighter and far more portable. Small ones could be used around the farm for running a firewood cutting saw, or threshing. Big ones could power a mill. They also found a lot of use in boats- many fishermen with sailboats discovered that a small gas engine could be fitted up in the bilge against the stern with a small propeller, and would provide a way to maneuver in and out of the harbor, a way to loaf home, when there was a dead calm, or sometimes even provide just enough force to keep the boat off a lee shore.
They also were relatively easy to make. Some large makers, like Fairbanks-Morse , turned them out, but there were a number of small machine shops that did as well.
Hit-and-miss engines were not too finicky about fuel- some could be run on kerosene or diesel. But , especially for cold days, gasoline would generally be required for starting ( done by grabbing the flywheel and giving it a yank....and then another...and then another) . So, even in the years before Henry Ford's Model T, there was someone selling gasoline in many, many towns. Henry did contemplate the possibility of running his cars on alcohol at first, with the thought that it could be more readily available, but alcohol has its own problems as an auto fuel ( readily absorbs water, less horsepower per gallon, and denatured ethanol alcohol -with some methanol in it is -very toxic). When the automobile became a big thing, of course, stores suddenly began to sell a lot more of it. And the more efficient car engines needed better gasoline, too...but that's a different story.
At many farm shows these days you will encounter hobbyists with their lovingly restored hit-and-miss engines, often running a variety of farm machinery. The pocketa-whoosh-whoosh-pocketa sound is very cheerful. Pity they aren't more efficient.