Remove the old light fixture from the wall or ceiling using a screwdriver.
Disassemble the fixture into its individual components. This makes it easier to clean the fixture and install the wiring. Label the pieces of the fixture, and record the order in which you removed them, to make reassembly easier.
Clean the fixture, using the method appropriate for the material used to construct the fixture. Remove any paint that splattered onto the fixture over the years with paint remover.
Remove the gas burners from the fixture's lamps.
Clean the gas lines inside the different pieces of the fixture with compressed air. This creates more room for the wiring.
Lock the gas valves on the fixture by applying an epoxy to the valve to keep it from moving. This prevents the valve from turning and cutting the electric wires.
Strip about 1/2 inch of insulation from the end of an 18-gauge wire. Attach the "hot" wire to the brass screw on the socket by wrapping it around the screw and tightening it. Repeat this with the neutral wire, attaching it to the silver screw on the socket. The hot wire is a solid color and feels smooth to the touch, while the neutral wire has a pattern printed on the insulation and feels rough to the touch.
Slide the other end of the wire through the arm of the light fixture until it emerges from the other end. If you cannot fit the wire through the tubelike fixture, try rubbing the insulation with dry soap as a lubricant. If the hole is too small for the wire, run it on the outside of the arm where it won't be clearly visible, such as the top edge of the arm on a ceiling fixture. Attach the socket housing to the end of the fixture. Install the wiring and socket on any other arms.
Reassemble the fixture, reversing the process you used to disassemble it.
Test the electrical cable for the fixture that extends from the wall or ceiling with a voltage tester. While the cable on a new electrical circuit shouldn't be wired into the main box until the end of the project, checking the circuit to be sure can save your life. Turn off existing electrical power at the breaker box before proceeding.
Connect the black, hot wire to the hot wires from the fixture by twisting them together with a plastic twist cap. Repeat this by twisting the white, neutral wire to the neutral wires from the fixture with a twist cap.
Reinstall the fixture on the wall or ceiling.