The gallon is a unit of volume in the imperial unit system with the symbol gal.
1 British imperial gallon is defined as 4.54609 litres or 277.4194 in³.
The term gallon derives directly from the Old Northern French term 'galun' which means 'liquid measure'. The origin of the word prior to this is still unknown. It originated as the base of the system for measuring wine and beer in the UK and has now been adopted across the world and there are similar versions in the US and associated states (although they measure slightly differently).
The barrel is a unit of volume used in the oil industry with the symbol bbl.
Oil is more commonly expressed in terms of cubic metres (m³) but in the US and in the economic world (mainly because such a large percentage of the world's oil is shipped to the US) as barrels.
The measurement of the barrel originated in the US at the first oil well in Pennsylvania. There were so many variants of barrel size (including those used for wine and other goods) that the distrust became so prevalent a central and standard barrel size was created. This was finally established in 1872 as 42 US gallons.