Its likely a problem in your evaporative emissions systems - a set of tubes that capture, carry and store your gas fumes so that they can be burned in the engine rather than just being vented to the atmosphere.
You are likely ending up with liquid fuel in those lines so it floods the engine. Flooring the gas pedal is a way to clear a flood.
If you are in the habit of topping off the gas tank, stop. Just stop pumping after it clicks off the first time. Otherwise, this kind of thing happens.
By now you have to have someone check out the evap system. There's probably a vent valve on the tank that, if it isn't right, will let liquid fuel go in rather than just fumes. You may also have a saturated charcoal canister (probably up front somewhere - its the thing that stores the fumes).