Well first off, pure ethanol is hygroscopic; it attracts water, to the point that it will pull it out of the air. Ethanol and gasoline will mix, but ethanol, gasoline and water will not; the ethanol-water mixture will come out of solution and settle on the bottom of your tank. Add a little oxygen to the mix, and you get rust. However, the more common side effect of this is more immediate; turn the car on, and the fuel pump will draw the water from the bottom of the tank into the engine, where it will promptly kill it, and require a costly dry-out process.
Down here in the south, where it's hot and humid most of the year, you hear a news story or two about this every year, usually when a gas station didn't properly purge its storage tank on a regular basis. The regular addition of thousands of gallons of fresh ethanol fuel "recharges" this hygroscopic process, causing a rather large pool of water to form at the bottom of the tank which the station is supposed to drain regularly. If they don't, and you fill up when the store's tank is just a little too low, or just a little too soon after the tanker's refilled it, the pump will draw a water-gas emulsion, or even straight water, into your tank, and the water will settle to the bottom.
The usual fix for long-term storage of ethanol fuel is to add a stabilizer, which will contain a high concentration of isopropanol. The main thing that will do is form an azeotropic mixture with water, meaning that its components will evaporate at the same rate, so when the isopropanol evaporates, it takes the water with it. This same mixture, in sufficient concentration, will also burn, so while it's not the greatest thing for your engine it can at least be flushed out the normal way.
Second, gasoline, as you probably well know, isn't a pure substance; it was originally what was left over after the refinery had extracted the "useful" heavier compounds (kerosene, diesel fuel, lubricating oil, paraffin waxes) out of crude oil by fractional distillation. Nowadays it's much more carefully purpose-made by thermal decomposition of heavier alkanes, but it's still an amalgam of relatively lightweight carbon compounds (usually between 6-12 carbons, with the dividing line for "octane rating" drawn between heptane and octane), plus additives and pollutants. It contains three components of interest; sulfur (a naturally occurring pollutant and difficult to remove completely; "summer blend" gas in the U.S. is more expensive because they have to get rid of more of it to prevent smog and acid rain), oxygen (modern fuels are oxygenated to make them more clean-burning), and ethanol (added to make the fuel burn cleaner and be more sustainable to produce than neat gasoline).
In the presence of water (pulled in by the ethanol) and oxygen, sulfur naturally forms sulfuric acid by a variation of the "contact process"; it oxidizes easily to sulfur dioxide, then more slowly to sulfur trioxide, which when dissolved in water becomes sulfuric acid. This reaction, specifically the formation of sulfur trioxide, is sped up in industrial processes by heat and by contact with catalyst metals such as vanadium oxide (hence "contact process"), but it will also happen on its own without any special treatment (i.e. acid rain).
This sulfuric acid will do a lot of corrosion damage, reacting with the tank's sheet metal producing hydrates of iron sulfate. When burned, those sulfates decompose into iron oxides and sulfur dioxide again, which do more damage to your exhaust system on the way out (rust is a catalyst for more rust, and we've discussed sulfur dioxide's contribution to the party in detail). In addition, sulfuric acid is even more hygroscopic than ethanol; at concentrations in water as low as 10%, it'll attract more water. Lastly, acids and alcohols form esters, in our case ethyl sulfate, and esters and alcohols form ethers, here diethyl ether (with the sulfuric acid and water as a byproduct). These are reversible and ultimately circular reactions, which will form an equilibrium of roughly equal concentrations of the intermediates. A dehydration reaction to produce ethylene is also possible in very high acid-to-water concentrations of sulfuric acid (possible when filling up in the winter, when it's dry and the gas has more sulfur). Ethylene will form a number of intermediate products with just about anything in that gas tank, some better for your engine than others (ethylbenzene is an antiknock compound; methyl ethyl ketone is a solvent and a pollutant byproduct of combustion engines).