One US gallon is exactly 3.785411784 litres. The figure is exact rather than measured because the US gallon is defined as exactly 231 cubic inches, and the inch is defined in metric terms.
About the units
The US liquid gallon descends from the English wine gallon, standardised by an act of 1707 at 231 cubic inches — a number chosen because it was close to the capacity of a standard wine cask measure of the period. When Britain reformed its measures in 1824 it abandoned the wine gallon and adopted the imperial gallon based on ten pounds of water, but the United States had already gained independence and kept the older definition. That is the whole reason the two gallons differ. The litre is defined as exactly one cubic decimetre, which is 0.001 cubic metres, and has been since 1964.
The exact factor
The derivation is 231 in³ × 16.387064 ml/in³ = 3,785.411784 ml, so 3.785411784 litres exactly. In the other direction, one litre is 0.264172052358 US gallons — a little over a quarter. The approximation most people carry is that a gallon is about 3.8 litres, or that four litres is a bit more than a gallon. The imperial gallon at 4.54609 litres is twenty per cent larger, which is the source of most cross-Atlantic confusion about fuel economy.
Where you meet this conversion
Fuel is the dominant case. American pump prices are per gallon and European prices per litre, and comparing them requires this factor plus a currency conversion, which is why petrol price comparisons in the press are so often wrong. Fuel economy compounds it: American miles per gallon uses the US gallon, British miles per gallon uses the imperial gallon, and the two figures for the same car differ by twenty per cent. Paint, agricultural chemicals and swimming pool volumes are the other frequent users.