When 3C273 was discovered then Hubble's law was well established - so if the redshift of 3C273 was non-cosmological then it would have to be (roughly) part of the local group of galaxies.
However, 3C273 is a point source, so that would put a limit on the angular extent and hence on the physical size. Let's do some rough numbers. Assume that it could be up to 5 Mpc away and is of angular size <1 arcsec (regardless of its distance). This would make it less than 20 pc in diameter.
If we assume a spherical object and that the emission is coming from a surface of radius $r$, then we can estimate a gravitational redshift from the Schwarzschild metric as
$$z = \left( 1 - \frac{2GM}{c^2r}\right)^{-1/2} -1\ .$$
and so
$$ M = \frac{c^2 r}{2G} \left( 1 - \frac{1}{(1+z)^2}\right)\ .$$
The redshift of 3C273 is 0.158 and if $r=10$ pc then $M\simeq 3 \times 10^{13} M_\odot$, which would be much bigger than the entire mass of the local group!
Now you could argue that it is much closer than 5 Mpc - which reduces $r$ and hence the required $M$.
However, if we put it at the edge of the Milky Way (at 100 kpc), then $r\sim 10^{16}$m and $M \sim 10^{12}M_\odot$ (similar to the entire mass of the Milky Way!) or if you put it at the edge of
the Solar System (at 100 au), then $r \sim 10^8$ m and $M\sim 10^4M_\odot$ ! i.e. This would totally disrupt the Solar System.
Thus, at whatever non-cosmological distance you put it at, if the redshift was gravitational, then the mass of 3C273 would totally dominate the dynamics of the local group, the Galaxy, or the Solar System respectively.
This argument alone isn't foolproof. One could assume the object is much smaller than implied by the upper limit to its angular diameter, leading to a smaller radius and a smaller implied mass. But the density goes as $M/r^3$ and so goes up as $r^{-2}$ as we make the radius smaller. The argument used by Greenstein & Schmidt (1963) was that you required neutron-star densities to get the required gravitational redshift in a stellar-mass object and that was totally incompatible with the presence of "forbidden lines" in the spectrum, which would be quenched at high densities. In addition, the blackbody temperature of a neutron-star sized object with the flux of 3C273 would need to be $\sim 10^{11}$ K. i.e. They ruled out a high-density, small radius possibility.