Leave the garment outside in the fresh air for 24 hours before trying to launder it. Sunshine and air-drying can reduce or eliminate the smell of gasoline.
Saturate the garment with water from your garden hose if it still smells like gasoline after air-drying for 24 hours. Leave it outside and wait for it to air-dry again.
Add a cup of white or apple cider vinegar to your washer along with your regular laundry detergent. Add only the garment and wash as you normally do. Do not wash it with any other clothing. Do not put the garment in the clothes dryer.
Repeat the washing process if the garment still smells of gasoline. This time add a laundry degreaser to the stain. Do not put the garment in the clothes dryer.
Test the garment to see if it still smells of gasoline. If it does, toss it out. If not, air-dry the garment or put it in the clothes dryer on low heat.