YES - THERE IS A WAY !
Select c3:d6 per screenshot (1st table) and then enter this formula for the conditional formatting rule:
=SUM(1*(IFERROR(UNICODE($C3:$D3),0)=88))*(C3="")

Notes:
- applicable for "X" per your 2nd sentence
- assumes no shading if both cells contain "X"
Unequivocally, this is a 'rule/function that grays out one of the cells is the other has an "X" ', or, per original Q:
"if one cell (out of 2 columns) gets an X, gray out the other one automatically... is there a [i.e. any] way to do this?"
Mods:
1] For any non-blank (not just "X"):
=SUM(1*($C3:$D3<>""))*(C3="")
2] Case insensitive variant (i.e. allow "X" or "x"):
=SUM(1*($C3:$D3="x"))*(C3="")
(sum function treats "X" the same as "x", so could use either for this mod)
References: Wiki (unicodes)