Today G is for gonads (not just for kicking anymore). Gonads are the organs that make gametes (sex cells). In biological females these are ovaries making eggs and in biological males these are testicles making sperm. In embryos both ovaries and testicles start as identical gonad ridges. They only differentiate later in development due to the SRY gene on the y chromosome which turns the ridges into testicles. Without that gene, they will develop into ovaries.
Depending on the specific condition they have, most intersex people can have normal ovaries, or normal testicles. Depending on the condition however, there are also two different ways their gonads might be ambiguous:
mixed gonadal dysgenesis: usually found in mosaic Turners Syndrome cases. Due to a combination of male and female chromosomes, the person will have two different gonads. On one side, a malformed undescended testicle will create testosterone leading to a male appearing scrotum and vas deferens on that side. The other side is a streak gonad, a nonworking gonad that is mostly fiberous tissue. On this side a fallopian tube and malformed uterus will form (in the absence of sex hormones the body defaults to a female form). This hormonal imbalance usually results in ambiguous genitalia.
ovotestis: A very rare condition, formerly called “true hermaphroditism” now called ovotesticular disorder of sexual development. This is when the gonads have a mix of ovarian and testicular tissue in them. This results in ambiguous genitalia.
In both cases these malformed gonads have a much higher rate of going cancerous, thus they are usually removed.