Two gallons, twenty percent apart
The US liquid gallon is exactly 3.785411784 litres. The imperial gallon, used in the UK and still on Canadian and Caribbean fuel signage, is exactly 4.54609 litres — about 20% larger. They are genuinely different units that happen to share a name, and the gap is wide enough to wreck a fuel-economy comparison or a paint estimate.
The pint problem underneath
Both systems divide the gallon into four quarts and eight pints, so the divisions inherit the same 20% difference: a US pint is 473 mL and an imperial pint is 568 mL. That is why a British pint of beer is visibly larger than an American one. Worse, the two disagree about how many fluid ounces make a pint — sixteen in the US, twenty in the imperial system — so the imperial fluid ounce is actually the smaller of the two despite the imperial pint being bigger.
Where the difference came from
The US gallon descends from the English wine gallon of 231 cubic inches, fixed in 1707 and carried across the Atlantic before Britain reformed its own measures. The imperial gallon was defined in 1824 as the volume of ten pounds of water, which came out larger. America kept the older unit, Britain adopted the new one, and the two have disagreed ever since.
Fuel economy is the usual trap
An American car rated at 30 mpg and a British car rated at 30 mpg are not equally efficient — the British figure uses the larger imperial gallon and is roughly 20% better. Converting to litres per 100 km removes the ambiguity entirely, which is why almost every other country uses it.