Surely, since spacetime curvature is gravity, these equations aren't saying that gravity itself has an equation of state of $w=-1/3$?
Gravity is an effect of spacetime curvature. The equation of state describes a relation between the stress-energy-momentum tensor’s components, a geometric object which is also a distinct effect of spacetime curvature. None of these things are spacetime curvature.
Spacetime curvature is the direction of the basis vectors of the manifold in which we live changing over time/distance, e.g. $g_{\mu\nu,\lambda}\neq0$. As a consequence of this, many things happen, including
- (under specific circumstances) acceleration effects that can be approximated by Newton’s gravity,
- absolute time dilation in specific regions, which can lead to variable speeds of light,
- stress-energy-momentum tensor components that show up as pressures/energy densities (the ratio of which gives you $w$).
Note that these are all effects of, not the same thing as, spacetime curvature.
The equation of state also only applies to very specific spacetimes - usually FLRW ones, given that it frequently arises from the Friedmann equations. It assumes that the scale you’re talking about is so large that things like galaxies/stars/etc. can be represented as a continuous fluid rather than individual celestial bodies. For a Universe dominated by cosmic strings, you get $w=-1/3$; for a “dust” universe, e.g. with energy density but comparatively-tiny pressure, $w=0$; note though that these values would change dramatically in time and space if you “zoomed in” on one galaxy or star or even planet.