Some STIs can cause erectile dysfunction by infecting the prostate gland. Untreated STIs like chlamydia and gonorrhea can lead to complications that impair blood flow needed for an erection. Regular ...