There are many reasons to observe gasoline odours inside a car. It may or may not mean that there is a problem with your vehicle that should be fixed right away, but unless the smell is very strong it is unlikely that you have any imminent danger of fire or explosion. However, it always means that fuel is evaporating into the cabin and the air that you are breathing. But that fuel could be inside or outside your car, and may have nothing to do with your vehicle.
Not all cars function perfectly all the time. A car's failure to completely burn fuel releases the excess gasoline into the exhaust fumes. Normally, that excess gas gets burnt in the catalytic converter. A failed combustion paired with a failed catalytic converter or an exhaust leak in front of the converter will produce a gas smell in the exhaust.
Vehicle ventilation systems draw air from the outside, and windows and other seals leak air. Driving behind a vehicle with unburned gas in its exhaust will cause you to smell gas inside your vehicle. Evaporation of gas can also build up in your cabin if your car sits in the garage for several days.
Gas leaks in the engine compartment or at the fuel tank can also cause you to smell gasoline. A leak at the gas tank fill tube or the evaporative fuel return lines will allow fuel vapour to enter the cabin. Leaks in the engine compartment not only vent fuel vapours into the cabin, but are also dangerous as they can result in fires. Common areas to find leaks are around the fuel pump, fuel injectors, carburettor, or fuel lines. Do not run a vehicle that has gasoline leaking in the engine compartment.
The smell of gasoline can linger a long time on many different types of materials, especially without ventilation. Storing a full gas can in the boot can lead to a smell of gas in the cabin even after the can is removed. Spilling any gas in the boot exacerbates the problem. Your boot is not sealed from the cabin well enough to prevent fuel vapours from entering the cabin.
Sometimes just being around fuel vapours can allow them to enter your car. Parking at a petrol station is a perfect example. Many gas stations across the country do not have fuel vapour return lines and smell strongly of gasoline. Just parking your car or running the air conditioner in an area like this will cause the cabin to smell of gasoline for a while.