TonyV is on the right track. The previous suggestions that it could be an old gas mantle supply are good. If you can clean it up and ascertain whether it is an iron pipe, or capping, you can be sure that it is an old gas light supply. If it is, the chances of still being connected to the gas main are virtually zero. I would turn off the gas supply and then either open the end capping nut or even cut the pipe. Then carefully, with the lights switched off, and no naked flames in the vicinity of the pipe, gradually ease the gas supply back on. You will smell gas immediately if it is still attached. (not likely I would bet) If it is not you will need to hack away the plaster etc and cut the pipe away with a hacksaw or grinder so that you can plasterboard over it.