As a gas log installer for many years I found the best solution was to apply a liberal amount of "Liquid Wrench" to each fitting and let it sit for at least 1/2 hour before attempting to loosen fittings that were tough to undo. If this does not work, apply more Liquid Wrench and let it sit over night. Then apply more the next day and let it set for a 1/2 hour. Be sure to use 2 good sized pipe wrenches so you have a solid grip and good leverage. But, be careful not to apply too much pressure when turning the wrench as you can break the pipe at the threads. Instead, turn the wrench slowly applying a little more pressure at a time to see if the pipe will turn. Watch the fitting if it appears to be breaking loose to make sure it is actually unthreading instead of bending. If it is bending, then the fitting will most certainly break off. If this happens, you may need to contact a plumber to remove the pipe and rethread it, which can be quite costly...so you don't want to break it.
BTW: Gas line fittings in the USA are threaded just like any other pipe, they are not reverse threaded.
Also, you may NOT need to remove the last elbow as it sometimes makes it easier to install a gas log. If you leave the last elbow, you will need to screw a 1" nipple into it in order to attach the gas log fitting. I always had a bunch of them in my toolbox. So when you go to the hardware store to pick up your "Liquid Wrench", be sure to grab one.
Liquid Wrench comes in 2 forms; as a Penetrating Oil and a Lubricating Oil. Be sure to buy the Penetrating Oil. It comes in several bottled forms (drops and spray). I always used the dropper bottle because when I was installing gas logs that is all they had. The spray bottle comes with a small tube like WD-40 has and should work just fine.
Also, if your local hardware store does not carry Liquid Wrench, then WD-40 is a reasonable alternative, but it is more of a lubricant than a penetrate so it does not work nearly as well if the pipes are rusted. Use the resource below to see what Liquid Wrench looks like. If you have some liquid wrench on hand, go ahead and give it a try using the same instructions I gave for Liquid Wrench.
P.S. If you break the pipe a normal pipe threader will not work in the cramped space inside a fireplace. I have a DIY solution for rethreading it to save you from having to call a plumber. You'll have to email for the solution if this happens.
Also, if you seem to be having a hard time after trying my suggestions, email me some pictures of your fireplace and I may be able to offer you some other tips.