Men who have sex with men (MSM) have an increased risk of developing anal human papillomavirus (HPV) infections, which can be a risk factor for anal cancer. HIV-infected women are also at risk of anal cancer. This study will evaluate the effectiveness of the Food and Drug Administration (FDA)-approved quadrivalent HPV vaccine, Gardasil, at preventing anal HPV infection in HIV-infected MSM and HIV-infected women.