The gastrointestinal mucosa is an important target of many sexually transmitted infections—it is a site for HIV entry, replication and destruction of CD4+T cells, and provides a niche for other sexually transmitted pathogens. This Review discusses the pathogenesis and gastrointestinal complications of HIV infection and summarizes advances in our understanding of other sexually transmitted infections of the gastrointestinal system.