The risk of acquiring sexually transmitted infections (STIs) depends on individual behavior and the network of risky partnerships in which an individual participates. STI epidemics often spread rapidly and primarily among individuals central to transmission networks; and thus they often defy the mass-action principle since incidence is not proportional to the infectious fraction of the population. Here, we estimate the contact network structure for an Atlanta, Georgia community with heterogeneous sexual and drug-related risk behaviors and build a detailed transmission model for HIV through this population. We show that accurate estimation of epidemic incidence requires careful measurement and inclusion of diverse factors including concurrency (having multiple partners), the duration of partnerships, serosorting (preference for partners with matching disease state), and heterogeneity in the number and kinds of partners. In the focal population, we find that injection drug users (IDUs) do not directly cause many secondary infections; yet they bridge the heterosexual and men-who-have-sex-with-men (MSM) populations and are thereby indirectly responsible for extensive transmission.