There are 128 ounces in a gallon. This is true for both US customary gallons and UK (imperial) gallons.
The US customary system of measurement defines one gallon as exactly 128 fluid ounces. The UK (imperial) gallon is slightly larger, but still contains 128 fluid ounces.
However, in the UK, the imperial fluid ounce is slightly larger than the US fluid ounce, so the two measurements do not convert directly to each other.