However, data for the Markit/CIPS manufacturing purchasing managers' index was almost all collected before the 23 June referendum.
There is a "clear risk" uncertainty resulting from the vote will have a short-term impact on manufacturing, Markit said in its report.
Its index for June had the strongest reading since January, rising to 52.1.
"The latest PMI signalled that the manufacturing sector has started to move out of its early year sluggishness in the lead-up to the UK's EU referendum," said Rob Dobson, senior economist at Markit.
"Whether this growth recovery can be sustained will depend heavily on whether the current financial and political volatility spills over to the real economy," he added.
Some economists says that is a likely scenario.
Spending and investment in the UK is likely to "weaken sharply", says Samuel Tombs, chief UK economist at Pantheon Macroeconomics. He expects businesses to "stop investing" and consumers to "spend more cautiously".
However, the performance of the pound is going to have an important influence on how manufacturing performs.
"The recent plunge in the pound of just under 10% as a result of the referendum result should help to cushion the more external-facing manufacturing sector in time," said Ruth Miller, UK economist at Capital Economics.
The Markit/CIPS manufacturing index is based on a survey of 600 industrial companies and reflects data on orders, output, employment, suppliers' delivery times and companies' inventories.
UK manufacturers reported a pick-up in activity in June from May, according to a closely watched survey.