I'm not aware of any code paragraphs regulating contact of a gas supplying pipe and the water heater enclosure. But this does not mean that it wouldn't be flagged by an inspector, code and interpretation of it's paragraphs, even non existing ones :), often varies significantly. If it was installed this way because of space limitation around the WH you can use electrical tape to wrap the gas pipe section in contact area, just to increase your chances for passing the inspection.
However, if there's room around the water heater but the installer instead of rerouting the pipe left it this way because it was faster and easier, some inspectors may complain about it for purely aesthetic reasons.
I wouldn't worry about it and just let the inspector decide. Since the installer pulled the permit he must be licensed and takes full responsibility for his work.