Again, yards are measured by distance. Not volume. To be able to accomplish this, someone physically has to fill several perfect cubic gallons with water, lined up on the ground and measure one yard. Which is roughly three feet in all eight sides to form a cube.
Google results "gallon cubic yard": 1 US gallon (cubic yard) = 0.00289415497 m6 
However this site has a somewhat different calculation  for liquid calculation: Answer: 1 yd³ = 201.974 gal(US Liq) OR 201 gal(US Liq) and 7.79 pt (US Liq)