What does the zeroth law of thermodynamics mean in curved spacetime? Let's say I have two infinitesimal boxes filled with gases in curved spacetime. These points are time-like separated. They will obey different thermal distributions based on the metric. What does the zeroth law of thermodynamics

If a body C is in thermal equilibrium with two other bodies, A and B, then A and B are in thermal equilibrium with one another.

mean over here? If two boxes have temperatures $T_1$ and $T_2$ respectively and $T_1 = T_2$, are they in thermal equilibrium?
Or, if I have boxes A and B, can I define a box C that is in thermal equilibrium with A and B (even though they are separated and obey different distributions)?
 A: We can define thermodynamic equilibrium and formulate zeroth law of thermodynamics for static spacetimes, when the metric could be written as:
$$
ds^2=-g_{00}dt^2+g_{ij}dx^idx^j.
$$
At equilibrium the matter also would be static, but unlike the flat space the temperature (as measured by thermometer at given point) would gain spatial dependence, $T(x)$, of the form:
$$
T(x)=\frac{T_0}{\sqrt{|g_{00}|}},
$$
where $T_0$, the red-shifted temperature, has the meaning of a temperature at a point where gravitational potential is zero (and so the $|g_{00}|=1$). It is this red-shifted temperature that is constant across the region of thermal equilibrium. This spatial dependence of temperature is known as Tolman temperature gradient (after R.C. Tolman who discovered this effect in 1930).
For a modern discussion of the effect see:

*

*Santiago, J., & Visser, M. (2019). Tolman temperature gradients in a gravitational field. European Journal of Physics, 40(2), 025604, doi:10.1088/1361-6404/aaff1c, arXiv:1803.04106.


What does the zeroth law of thermodynamics <…> mean over here?

It means that thermodynamic equilibrium introduces an equivalence relation between thermodynamic (sub)systems. The precise nature of thermal contact between systems A and B does not matter: it could be photon radiation within the reservoir enveloping both A and B, or vibrational degrees of freedom of some solid conductive material stretching between A and B, or gas of massive particles, or a sequence of different subsystems etc., as long as we know the temperature at one point, Tolman relation gives us equilibrium temperature everywhere else.
More details, discussions and related results could be found in PhD thesis of J. Santiago:

*

*Santiago, J. (2019). On the Connections between Thermodynamics and General Relativity, PhD thesis, Victoria University of Wellington, arXiv:1912.04470.

