Neisseria gonorrhoeae possesses a programmed recombination system that allows the bacteria to alter the major subunit of the type IV pilus, pilin or PilE. An alternate DNA structure known as a guanine quadruplex (G4) is required for pilin antigenic variation (pilin Av). The G-C base pairs within the G4 motif are required for pilin Av, but simple mutation of the loop bases does not affect pilin Av. We show that more substantial changes to the loops, in both size and nucleotide composition, with the core guanines unchanged, decrease or abrogate pilin Av. We investigated why these loop changes might influence the efficiency of pilin Av. RecA is a recombinase required for pilin Av that can bind the pilE G4 in vitro. RecA binds different G4 structures with altered loops with varied affinities. However, changes in RecA binding affinities to the loop mutants do not absolutely correlate with the pilin Av phenotypes. Interestingly, the yeast RecA ortholog, Rad51, also binds the pilE G4 structure with a higher affinity than it binds single-stranded DNA, suggesting that RecA G4 binding is conserved in eukaryotic orthologs. The thermal stability the pilE G4 structure and its loop mutants showed that the parental G4 structure had the highest melting temperature, and the melting temperature of the loop mutants correlated with pilin Av phenotype. These results suggest that the folding kinetics and stability of G4 structures are important for the efficiency of pilin Av.