The Brown and Black wires should be hard wired into the gas valve. This allows the micro switch inside the black plastic housing to turn on the spark ignition unit whilst pressing down to light the fire. If these wires have pulled out.. then the only answer is to buy a new valve as it comes with the wires already fitted for around £50 from a caravan store.
However, if these black and brown are still in there and the loose wire is around the battery ignition.. Then it must have pulled out from the small connected on the back on the battery box.. This can probably be soldered back into there to allow operation again.
Hope this Helps.
John
John Russell
April 2010