The best way to wash spilled gasoline out of clothes is by a multi-step process involving odor removal with baking soda, pretreating with both liquid dish detergent and stain stick, and a final wash with hot water. For best results, blot up as much of the gasoline as possible from the clothing with an absorbent cloth or some paper towels as soon as the spill occurs. Then begin the washing process as soon as you get home.
Start by thoroughly sprinkling all gasoline-stained areas with baking soda. The baking soda absorbs the gasoline smell. Next apply liquid dish detergent to the stains. Rub it in with a soft brush to start the cleaning process. Soak the clothes in a basin of hot water for 30 minutes to 1 hour. Remove the clothes from the water, and apply more baking soda to the areas affected by the gasoline. The odor of gasoline is aggressive and requires a second baking soda application to remove it all. Let the clothing air dry overnight to give the baking soda time to work.
The next day rub the gasoline stains with a commercial stain stick to remove the last hints of the stains. Let the clothing sit for 5 minutes for maximum penetration. Then wash the item in your washing machine by itself using hot water and your normal laundry detergent. Washing the item alone keeps gasoline from transferring to your other laundry. Finish up by drying using your usual method.