Catalyzes the conversion of xanthine monophosphate (XMP) to GMP in the presence of glutamine and ATP through an adenyl-XMP intermediate. ATP + H2O + L-glutamine + XMP = AMP + diphosphate + GMP + 2 H(+) + L-glutamate Purine metabolism; GMP biosynthesis; GMP from XMP (L-Gln route): step 1/1. Homodimer.