Again hard to tell from the pics. What it looks like to me is that the vertical piece comes down from near ceiling to the floor at an angle, but the 90-elbow at it's bottom side is screwed on at such an offset angle that the last horizontal run at the bottom is actually plumb and square to the floor + water heater. Then there is a little 45-elbow just before the WH inlet.
Honestly that is fine and I'd leave it alone. You're going to end up rotating a fitting way back out of the picture so that the pipe up top runs square to the ceiling, and also taking apart a bunch of other fittings, just for something cosmetic. I agree that it looks funny but it will work fine.
If you want to fix it then there are probably a half dozen different ways. And things might not line up just right after the first attempt -- when I've installed WH i have installed gas line first & then moved WH until it lines up with where the gas pipe ends up. And then last connect up the water plumbing. To position the WH first and then connect the gas to it afterward is more difficult, since you don't have any wiggle room, this is what you are attempting to do now since the water pipes are already hard plumbed in & the WH can't budge. You will likely end up with one or more fittings that are 1/2" too short or too long (even if you try to measure perfectly) & have to make several trips to the hardware store until everything is right.
Last if you do this be 110% sure everything is tight and use leak detection compound on all the fittings including father back into the existing pipes on anything you may have torqued on inadvertantly during your mods. Gas is nothing to take lightly, easily the most dangerous thing if done wrong.