The YouGov survey for the Evening Standard showed Goldsmith, the Conservative candidate, on 49% with Labour's Khan on 51%. The tight race has surprised some commentators as the capital is considered to be a more pro-Labour city.
Asked by YouGob which candidate would make the better mayor by, 28% choose Goldsmith, 29% choose Khan. And 44% said they were not sure.
Freddie Sayers, the editor-in-chief of the polling company, said: "What’s remarkable is just how evenly matched the two men are, right down to the different aspects of their personality. Likeable? Its 41%/41%. Good in a crisis? 26%/27%. Up to the job of Mayor? 38%/39%.
"There’s only one area where you start to see a major difference – whether the two men are ‘in touch with ordinary people’. 41% think Mr Khan is, compared to only 18% for Zac Goldsmith. His multi-millionaire status is one weak point for the Tory, and you can expect his rival to make a lot of noise about it."