Most of the time a gas smell is a leftover fuel spill or a loose gas cap - both harmless and free to fix. Ranked from harmless to serious: fuel spilled at the pump or a tank venting on a hot day (very common, no cost); a loose, cross-threaded, or missing gas cap (common, $0-$25, sets P0442/P0455); an aging or cracked filler-neck or EVAP hose (common, $100-$400); a leaking fuel injector O-ring (occasional, $100-$600, sets P0171/P0172); a failed fuel pressure regulator flooding the engine (occasional, $100-$550, sets P0172); a cracked charcoal canister or damaged filler seal (less common, $300-$600); and a cracked or corroded fuel line or leaking tank (uncommon but serious, $150-$800+).
Check under the car for a wet spot or drip first: if there is none, it is very likely vapor, not a leak. Stop driving and have it inspected if you can see fuel dripping or a wet spot growing, the smell gets stronger the longer or faster you drive, it is accompanied by a strong cabin smell, or you hear hissing near the engine bay - liquid gasoline near a hot exhaust is a real fire risk. Everything else on the list above is a schedule-it-this-week repair, not an emergency.