Do not dry clothing with gasoline on it in a conventional dryer; gas is combustible. Instead, wash your clothing and let it air dry. You can remove the smell with regular detergent and ammonia.
Rinse off the clothing
Take your article of clothing outside. Rinse it thoroughly with a hose.
Let the clothing dry
Allow the article of clothing to hang outside for at least 24 hours. This dries the clothing and airs it out.
Wash the article of clothing
Wash the clothing when the smell of gasoline is faint. Wash the clothing alone using the hottest temperature setting safe for the fabric. Use the largest load setting to fill the machine with water. Add slightly more than the amount of detergent that you use for a regular load of laundry. Also add 1/4 cup of ammonia. Run the cycle.
Let the clothing air dry
Hang the clothing outside to air dry. Smell the clothing when it is dry. If the gas odor is gone, you are finished. If the gas odor persists, rewash the clothing and let it air dry as many times as necessary to completely remove the odor. Don't put the clothing in the dryer until you can no longer smell gasoline.