Surveys were handed out at 90 venues (bars, clubs and saunas) and included questions on lifestyle, background and sexual behaviour.
Saliva samples were also collected from 2,311 of the 2,640 men surveyed to find out about HIV prevalence.
Brighton was found to have the largest proportion of men with HIV (14 per cent), while Manchester had the lowest (8.6 per cent).
Published in the journal Sexually Transmitted Infections, the study revealed that the rate of undiagnosed infection was high in all three cities, ranging from one in three in Brighton to more than four out of 10 (44 per cent) in London.
Across the three cities, one in three of the men surveyed who were HIV positive did not know they had the infection.
This was in spite of the fact that over two-thirds of these men said they had visited a sexual health clinic in the past year. Almost one in five HIV negative men and four out of ten HIV positive men said that they had had a sexually transmitted infection (STI).
The authors of the study argue that their findings indicate a need for "more effective HIV prevention".
"The reported high levels of STIs, by both HIV-negative and HIV-positive men, which are known to facilitate the transmission of HIV, is a major public health concern," the researchers write.
"Regular STI screening and effective behavioural interventions are required as part of clinical care to limit further transmission."
They add that other steps to reduce rates of HIV should include promoting voluntary confidential testing and research into why men do not undergo tests already.
Click here to run an energy price comparison, and see if you could be paying less for your gas and electricity.