A ten gallon hat is often thought to be large enough to hold ten gallons of water. This is not true (unless you have an exceptionally large head).
The gallon in "ten gallon hat" derives from the Spanish galón meaning braid. So a ten-gallon hat is a hat with a braiding around the brim.
A ten-gallon hat actually only holds 3/4 gallon or 3 quarts.