Apparently, the first places that sold gasoline were drugstores.
Henry Ford's mass-production of cars lowered prices and greatly increased car sales, and the need for filling stations.
The world's first gas station was built in St. Louis, Missouri in 1905 at 412 S. Theresa Avenue. The second gas station was constructed in 1907 by Standard Oil of California (now Chevron) in Seattle, Washington. (info from Wikipedia)