  We present the discovery of the optical afterglow of GRB 050505 and an
optical absorption spectrum obtained with the Keck I 10-m telescope. The
spectrum exhibits three redshifted absorption systems with the highest, at
z=4.2748, arising in the GRB host galaxy. The host absorption system is marked
by a damped Ly-alpha (DLA) feature with a neutral hydrogen column density of
logN(HI)=22.05+/-0.10, higher than that of any QSO-DLA detected to date, but
similar to several other recent measurements from GRB spectra. In addition, we
detect absorption lines from both low- and high-ionization species from which
we deduce a metallicity, Z~0.06 Z_solar, with a depletion pattern that is
roughly similar to that of the Galactic warm halo, warm disk, or disk+halo.
More importantly, we detect strong absorption from SiII* indicating a dense
environment, n_H>10^2 cm^-3, in the vicinity of the burst, with a size of about
4 pc. In addition, the CIV absorption system spans a velocity range of about
1000 km/s, which is not detected in any other absorption feature. We show that
the most likely interpretation for this wide velocity range is absorption in
the wind from the progenitor star. In this context, the lack of corresponding
SiIV absorption indicates that the progenitor had a mass of <25 M_solar and a
metallicity <0.1 Z_solar, and therefore required a binary companion to eject
its hydrogen envelope prior to the GRB explosion. Finally, by extending the
GRB-DLA sample to z~4.3 we show that these objects appear to follow a similar
metallicity-redshift relation as in QSO-DLAs, but with systematically higher
metallicities. It remains to be seen whether this trend is simply due to the
higher neutral hydrogen columns in GRB-DLAs, or if it is a manifestation of
different star formation properties in GRB-DLAs. [abridged]
