Don't know what you have tried so I am going to say this like you have never don this before
If yo have a gas fire place there is a safety valve that shuts the gas off when pressure is lost. The heat of the flame is what keeps this valve open. The valve usually has a litte red button on top of it that you have to depress and hold to light the pilot.
Trace the gas line back from the pilot. You will have to hold this button down for a little bit (60 seconds) after you light the pilot to allow the heat of the flame to warm up the sensing line and kepp the valve open.
Your other gas appliances (water heater) should have the same type of safety devices.