Suppose we are working with a Euclidean metric, and take the Lagrangian: $$\mathcal{L}=\frac{1}{2}\partial^{\mu}\phi\partial^{\nu}\phi g_{\mu\nu} = \frac{1}{2}\partial_{\mu}\phi\partial_{\nu}\phi g^{\mu\nu} .\tag{1}$$ The prescription to calculate the Hilbert stress-energy tensor is (according to the answer to the question Does metric signature affect the stress energy tensor?, which doesn't answer my question): $$ T^{\mu\nu} = -\frac{2}{\sqrt{g}} \frac{\delta (\sqrt{g}\mathcal{L})}{\delta g_{\mu\nu}} = -\frac{2}{\sqrt{g}} \left( \frac{\delta \sqrt{g}}{\delta g_{\mu\nu}}\mathcal{L} + \sqrt{g}\frac{\delta \mathcal{L}}{\delta g_{\mu\nu}} \right).\tag{2}$$
Now, while the two aforementioned ways to write the Lagrangian are supposed to be equivalent, it appears (at least on first glance) that they yield a different result when taking the variation. The reason for this is that naively varying the first gives $$\delta\mathcal{L} = (1/2)\partial^\mu\phi\partial^\nu\phi\delta g_{\mu\nu},\tag{3}$$ while from the second we can calculate $$\delta\mathcal{L} = -(1/2)\partial^\mu\phi\partial^\nu\phi\delta g_{\mu\nu}.\tag{4}$$
The second one (derived using a formula given here: Inverse metric in linearised gravity) in fact seems to be the correct one that agrees with the result in the literature, and what I've figured out is that this happens because we need to treat the lowered index fields as the "fundamental" ones when taking this variation, and not the raised ones. In other words, in the first expression we would have to write $$\partial^\mu\phi=g^{\mu\alpha}\partial_\alpha\phi,\tag{5}$$ and then also vary $g^{\mu\alpha}$.
The trouble is that while I have figured this out (although I'm not 100% sure I have the right idea), I can't really justify entirely to my satisfaction WHY you have to treat the lowered index fields as "fundamental" instead of the raised ones in this particular setting, and why it seems to make this much of a difference. I imagine there is something possibly differential-geometric that I'm missing here. That is, why do I have to write $\partial^\mu\phi=g^{\mu\alpha}\partial_\alpha\phi$ before taking the variation, but don't have to include the metric by writing $\partial_\mu\phi=g_{\mu\alpha}\partial^\alpha\phi$ for the downstairs indices?