0133 GMT May 26, 2019
The narrowing of the gap reflected a two percent increase in exports of goods and services, taking them to £43.8 billion.
Imports fell by 0.5 percent to £48.3 billion, according to BBC.
Although the pound fell sharply after the Brexit vote, which should make UK products cheaper abroad, the ONS said it was too early for firm conclusions.
The pound was 15 percent lower against other currencies in July compared with the same time a year ago, the ONS said.
The ONS points out in its release that the general consensus among economic commentators is that the recent depreciation in the pound should boost export and manufacturing competitiveness.
However, it said this does not necessarily occur as the price of imported materials used to make UK goods rises as the pound falls.
Devaluation: The economic equivalent of caffeine. Drop the value of the pound by a tenth and your exporters get a stimulus; suddenly their goods are 10 percent less in dollars - making them cheaper and therefore more competitive. In the last week and a half, two striking economic updates have been published, suggesting the weak pound has helped.
Today it is the trade deficit. The fact that we as a country buy more than we sell — also known as a trade deficit — has been a persistent problem in the UK for at least two decades. But in July it narrowed by £1.1 billion to £4.5 billion. The other data was from manufacturers last week, who said the weak pound had helped stimulate the biggest jump in orders and new business for 20 years.