By simple proportion, if 340mm is equivalent to 0.0000031 gallons, then 1mm is equivalent to 0.0000031/340=0.00000000911 gallons (approx). That’s 9.11 billionth of a gallon. (However, since mm is a linear measure and gallon is a volume measure, the two are incompatible. Millilitre would be a more appropriate measurement compared to gallon. But note that a gallon is roughly 4000mL so 1mL is roughly 0.0003 gallon, and 340mL about 0.09 gallon, which is nearly 30000 times 0.0000031. So I guess your question is based on scaling.)