  Long-duration gamma-ray bursts (GRBs) provide a premier tool for studying
high-redshift star-forming galaxies thanks to their extreme brightness and
association with massive stars. Here we use GRBs to study the galaxy
mass-metallicity (M*-Z) relation at z~3-5, where conventional direct
metallicity measurements are extremely challenging. We use the interstellar
medium metallicities of long-duration GRB hosts derived from afterglow
absorption pectroscopy (Z~0.01-1 solar), in conjunction with host galaxy
stellar masses determined from deep Spitzer 3.6 micron observations of 20 GRB
hosts. We detect about 1/4 of the hosts with I-band absolute magnitudes, M ~
-21.5 to -22.5 AB mag, and place a limit of M>-19 mag on the remaining hosts
from a stacking analysis. Using a conservative range of mass-to-light ratios
for simple stellar populations (with ages of 70 Myr to ~ 2 Gyr), we infer the
host stellar masses and present the galaxy mass-metallicity measurements at z ~
3-5 (<z> ~ 3.5). We find that the detected GRB hosts, with M* ~ 2e10 solar
masses, display a wide range of metallicities, but that the mean metallicity at
this mass scale, Z~ 0.1 solar, is lower than measurements at z < 3. Combined
with stacking of the non-detected hosts (with M* < 4e9 solar masses and Z <
0.03 solar), we find evidence for the existence of an M*-Z relation at z ~ 3.5
and continued evolution of this relation to systematically lower metallicities
from z ~ 2.
