If it's a listed, factory assembled unit, there's no issue whatsoever. LP refrigerators, natural-gas hot water heaters and LP/CNG generators are three examples of commonly used listed equipment that combines gas & electrical in close quarters with no XP devices and no particular separation between gas & electric (other than the gas pipe).
Even for field installations, there's no requirement that electrical installations near gas piping be XP. You can put an electrical outlet or lamp immediately adjacent to your gas meter in your house (actually, I'd recommend putting a lamp right next to the meter, it makes it much easier to read).
Maybe I'm missing the point of your question -- that's why I fired a few of my own back at you. If your question is only whether or not it's OK to put gas piping next to electrical stuff, well the answer is generally yes. Piping, valves, etc., should not leak when installed properly. If they do, then you have a world of problems.
Now, anything that could reasonably be expected to leak gas during maintenance or accidents are generally required to be XP. But your valve & piping do not typically fall into that category.