Now that you have the thermocouple and the pilot tubing removed, and the wires marked and removed, its time to start taking the pipe apart.
The picture above is of the black iron pipe union, this union needs to be opened by loosening the large nut, while holding back on the other part of the union, not holding back will cause the whole union to turn.
The above image is me reconnecting after the gas valve is replaced, so the wrenches are reversed from opening the union.
Once the union is separated, back off the nipples and fittings going to the old gas valve.
Remove the old gas valve, it all turns counterclockwise.
Now before you put the new gas valve on to the pipe you need to check the directional arrow on the gas valve to be sure you are installing it in the right direction.