Yes, we are. For instance if we look at stars in our immediate neighbourhood (including the Sun) whose velocities relative to us we know, then we can get a very good idea of what the gravitational redshift due to their mass is (hint: very small for most of them).
When we look at stars very much further away we see much larger redshifts, and the redshifts increase as they get further away eventually becoming really dramatic. So we are led to one of two conclusions:
- stars further away from us are receding from us, and their recession velocity increases as they get further away;
- or stars much further away are much more massive, and they get more massive the further away they get, but equally so in all directions.
The second conclusion is bizarre.
- For it to be true we must live in a completely unique place in the universe, where stars are very light -- this is a violation of the principles that our part of the universe is not somehow special, and that the universe is the same everywhere on large scales.
- For it to be true would also imply that the laws of physics which control stellar evolution vary across the universe -- this must be true because we can, based on study of nearby stars build rather good models which relate the masses of stars to their spectra, metallicity and so on, and we can use those models to infer the masses of much more distant stars. Yet if very distant stars are systematically heavier than these models predict, the models -- and hence the laws of physics on which they are based -- must be wrong.
In other words for this conclusion to be true not only must we live in a very odd place in a universe which is not isotropic or homogeneous on large scales, but the laws of physics must in fact vary across the universe, with us, again, being at a very special place in the universe.