The BL Lac object 3C 66A is one of the most luminous extragalactic sources at TeV γ -rays (very high energy, i.e. E > 100 GeV). Since TeVγ -ray radiation is absorbed by the extragalactic background light (EBL), it is crucial to knowthe redshift of the source in order to reconstruct its original spectral energy distribution, as well as to constrain EBL models. However, the optical spectrum of this BL Lac is almost featureless, so a direct measurement of z is very difficult; in fact, the published redshift value for this source (z=0.444) has been strongly questioned. Based on EBL absorption arguments, several constraints to its redshift, in the range 0.096 < z < 0.5, were proposed. Since these active galactic nuclei (AGNs) are hosted, typically, in early-type galaxies that are members of groups or clusters, we have analysed spectro-photometrically the environment of 3C 66A, with the goal of finding the galaxy group hosting this blazar. This study was made using optical images of a 5.5 × 5.5 arcmin2 field centred on the blazar, and spectra of 24 sources obtained with Gemini/GMOS-N multi-object spectroscopy. We found spectroscopic evidence of two galaxy groups along the blazar´s line of sight: one at z ≃ 0.020 and the second one at z ≃ 0.340. The first one is consistent with a known foreground structure, while the second group presented here has six spectroscopically confirmed members. Their location along a red sequence in the colour-magnitude diagram allows us to identify 34 additional candidate members of the more distant group. The blazar´s spectrum shows broad absorption features that we identify as arising in the intergalactic medium, thus allowing us to tentatively set a redshift lower limit at z3C66A ≳ 0.33. As a consequence, we propose that 3C 66A is hosted in a galaxy that belongs to a cluster at z = 0.340.