Catalyzes the attachment of glycine to tRNA(Gly). Is also able produce diadenosine tetraphosphate (Ap4A), a universal pleiotropic signaling molecule needed for cell regulation pathways, by direct condensation of 2 ATPs (By similarity). ATP + glycine + tRNA(Gly) = AMP + diphosphate + glycyl-tRNA(Gly) Homodimer. Belongs to the class-II aminoacyl-tRNA synthetase family.