Dramatic images on social media show flames shooting from the damaged gas main on The Drive in Bardsey last night.
Emergency services and gas engineers were called to the scene at about 8.40pm.
A spokesman for West Yorkshire Police said a “small number” of properties on The Drive were evacuated due to their proximity to the incident.
A cordon was put in place, with the fire continuing to burn into the early hours. There are no reports of any injuries.
In a statement issued just after 9am, Northern Gas Networks said: “The fire has been extinguished and the situation made safe.
“We are now on with the process of inspecting, and subsequently repairing, the damaged section of main.”
Motorists have been warned that Keswick Lane is closed between its junctions with Wetherby Road and Woodacre Lane.