Context. The star-forming nature of long γ-ray burst (GRB) host galaxies provides invaluable constraints on the progenitors of GRBs and might open a short-cut to the characteristics of typical star-forming galaxies throughout the history of the Universe. Due to the absence of near-infrared (NIR) spectroscopy, however, detailed investigations, specifically a determination of the gas-phase metallicity of gamma-ray burst hosts, was largely limited to redshifts z < 1 to date. Aims. We observed the galaxy hosting GRB 080605 at z = 1.64 using optical/NIR spectroscopy and high-resolution HST/WFC3 imaging in the rest-frame wavelength range between 1150 and 8700 Å. These data allow us to study a z > 1 GRB host in unprecedented detail and investigate the relation between GRB hosts and field galaxies. Methods. We availed of VLT/X-shooter optical/NIR spectroscopy to measure the metallicity, electron density, star-formation rate (SFR), and reddening of the host of GRB 080605. Specifically, we used different strong-line diagnostics to robustly measure the gas-phase metallicity within the interstellar medium (ISM) for the first time based on [N ii] at this redshift.Results. The host of the energetic (E γ,iso ∼ 2 × 10 53 erg) GRB 080605 at z ∼ 1.64 is a morphologically complex, vigorously starforming galaxy with an Hα-derived SFR of 31 +12 −6 M yr −1 . Its ISM is significantly enriched with metals. Specifically, [N ii]/Hα = 0.14 ± 0.02, which yields an oxygen abundance 12 + log(O/H) between 8.3 and 8.6 depending on the adopted strong-line calibrator. This corresponds to values in the range of 0.4−0.8 Z . For its measured stellar mass (M * = 8.0 +1.3 −1.6 × 10 9 M ) and SFR, this value is consistent with the fundamental metallicity relation defined by star-forming field galaxies. The absence of strong Lyα emission constrains the escape fraction of resonantly-scattered Lyα photons to f esc < ∼ 0.08. Conclusions. Our observations provide a detailed picture of the conditions in the ISM of a highly star-forming galaxy with irregular morphology at z ∼ 1.6. They include the first robust metallicity measurement based on [N ii] for a GRB host at z > 1 and directly illustrate that GRB hosts are not necessarily metal-poor, both on absolute scales as well as relative to their stellar mass and SFR. GRB hosts could thus be fair tracers of the population of ordinary star-forming galaxies at high redshift.