We present Hubble Space Telescope (HST) and Chandra imaging, combined with Very Large Telescope MUSE integral field spectroscopy of the counterpart and host galaxy of the first binary neutron star merger detected via gravitational-wave emission by LIGO and Virgo, GW170817. The host galaxy, NGC 4993, is an S0 galaxy at z=0.009783. There is evidence for large, face-on spiral shells in continuum imaging, and edge-on spiral features visible in nebular emission lines. This suggests that NGC 4993 has undergone a relatively recent ( 1 Gyr) "dry" merger. This merger may provide the fuel for a weak active nucleus seen in Chandra imaging. At the location of the counterpart, HST imaging implies there is no globular or young stellar cluster, with a limit of a few thousand solar masses for any young system. The population in the vicinity is predominantly old with 1% of any light arising from a population with ages 500 Myr < . Both the host galaxy properties and those of the transient location are consistent with the distributions seen for short-duration gamma-ray bursts, although the source position lies well within the effective radius (r 3 e~k pc), providing an r e -normalized offset that is closer than 90% of short GRBs. For the long delay time implied by the stellar population, this suggests that the kick velocity was significantly less than the galaxy escape velocity. We do not see any narrow host galaxy interstellar medium features within the counterpart spectrum, implying low extinction, and that the binary may lie in front of the bulk of the host galaxy.