We present precise measurements of the eta and K0 masses using the processes phi to eta gamma, eta to gamma gamma and phi to Ks Kl, Ks to pi+ pi-. The K0 mass measurement, M_K=497.583 +/- 0.005 (stat) +/- 0.020 (syst) MeV, is in acceptable agreement with the previous measurements but is more accurate. We find m(eta) = 547.874 +/- 0.007 (stat) +/- 0.031 (syst) MeV. Our value is the most accurate to date and is in agreement with two recent measurements based on eta decays, but is inconsistent, by about 10 sigma, with a measurement of comparable precision based on eta production at threshold.