It depends on the surface and the amount of gasoline absorbed. Gasoline evaporates relatively quickly, so a small amount of gasoline odor may only linger for a few days. However, if large amounts of gasoline have soaked into a harder surface, for example, the lingering smell can hang around for years.