Gonorrhea is primarily transmitted through sexual contact with an infected person, including vaginal, anal, and oral sex. It can also be passed from mother to child during childbirth.