One way to remove a gasoline smell from car carpet is to scrub the carpet using a mixture of carpet shampoo and hot water. The shampooing should be followed up with a sprinkling of baking soda, which should be vacuumed up later.
For upholstery, a cleaner should be used that is appropriate for the material, such as leather or vinyl cleaner. Once the cleaner has been applied, it should be wiped down with water and then patted dry.
A car should always be ventilated for a day or so after a gasoline spill to make sure any fumes are gone.