While we often talk about "gas" in cars, this is actually referring to gasoline, which is a liquid fuel. The engine mixes gasoline with air, ignites it, and uses the resulting explosion to power the car.
So, the air is essential for combustion, providing the oxygen necessary to burn the gasoline.