I would bet you need a new thermocouple which is the little line that screws into the gas valve and the head of it sticks into the flame. The flame keeps it hot which keeps the gas valve open. Sometimes it can get dirty or shifted away from sticking into the flame but you probably need a new one. They run about 5 bucks or so.
There could be other problems but this is the most likely and the first to replace or repair. If all else fails get a furnace repairman out there. The november 2000 issue of family handyman magazine has a good article on cleaning furnaces which explains lots of things.
If it is out of place, it may just push or slide over or have a set screw holding it to loosen before adjusting it. If replacing, then measure the length so you get the right length. They usually come in increments of 3".
Good luck and I hope you and your pipes don't freeze tonight. I headed out tomorrow to do a complete repipe job on a mobile home.