We investigate the impact of chameleon-type f(R) gravity models on the properties of galaxy clusters and groups. Our f(R) simulations follow for the first time also the hydrodynamics of the intracluster and intragroup medium. This allows us to assess how f(R) gravity alters the X-ray scaling relations of clusters and how hydrostatic and dynamical mass estimates are biased when modifications of gravity are ignored in their determination. We find that velocity dispersions and intracluster medium temperatures are both increased by up to 1/3 in f(R) gravity in low-mass halos, while the difference disappears in massive objects. The mass scale of the transition depends on the background value f_R0 of the scalar degree of freedom. These changes in temperature and velocity dispersion alter the mass-temperature and X-ray luminosity-temperature scaling relations and bias dynamical and hydrostatic mass estimates that do not explicitly account for modified gravity towards higher values. Recently, a relative enhancement of X-ray compared to weak lensing masses was found by the Planck Collaboration (2013). We demonstrate that an explanation for this offset may be provided by modified gravity and the associated bias effects, which interestingly are of the required size. Finally, we find that the abundance of subhalos at fixed cluster mass is only weakly affected by f(R) gravity.