The UK-wide BMG telephone poll for The Herald puts support for Remain at 46 per cent and backing for Leave on 43 per cent, with 11 per cent undecided or unwilling to say.
Excluding this group, 52 per cent were in favour of staying in the EU, with 48 per cent backing Brexit.
By using a series of questions to calculate the likely voting intention of people who say that they will vote but have yet to decide or do not want to say, BMG put the Remain camp ahead on 53 per cent compared to 47 per cent.
The survey of 1,064 voters was carried out between June 10 and 15, before the fatal shooting and stabbing of Labour MP Jo Cox.
It follows a series of opinion polls putting Leave ahead.
Michael Turner, research director at BMG, told the newspaper: “Our polling suggests that, although there may have been a strong shift towards a vote to leave the EU in recent weeks, the Remain camp are still very much ahead.
“BMG currently estimates around a one in nine chance of Brexit on June 23, but this could change considerably between now and polling day.”
BMG said the research suggested that Labour supporters were more than two-to-one in favour of remaining in the EU and could be the “deciding factor” in the vote.
Mr Turner added: “If we see a ‘lazy Labour’ effect at the polls again, that could very easily change the result.”