Gauge transformations seen as part of the relationship between general relativity and quantum mechanics