The idea that gay men are more well endowed that heterosexual men was first published in 1999 in the Archives of Sexual Behavior. What the authors of this study did was analyze data collected by the Kinsey Institute between the years 1938 and 1963.
They looked at data from 5,122 men, of whom 935 were classified as homosexual and 4,187 were classified as heterosexual. Measurement data were available for both flaccid and erect penile length and girth, as well as men’s own estimated erect penile length. Participants had taken the measurements themselves and mailed them to the Institute. Across all five dimensions, gay men had significantly larger penises. Most notably, the measured erect length for gay men was 6.46 inches, compared to 6.14 inches for straight men. Measured erect circumference was 4.95 inches for gay men, compared to 4.80 inches for straight men.
To learn more about this study, see: Bogaert, A. F., & Hershberger, S. (1999). The relation between sexual orientation and penile size. Archives of Sexual Behavior, 28(3), 213-221.