Mounting iron gate on crooked posts
If you can't straighten the pillars by mud jacking as Sherwood suggested, I'd suggest embedding rods into the pillars, then attaching the jambs (your 2x2 posts) to those and getting them nice and vertical.
Once the jambs are vertical, it should be a piece of cake to attach the hinges and strike plate so your gate is centered, vertical, and balanced.
Trim out between the jambs and pillars to hide the angle. You don't indicate the height of the posts/gate, but 7/8&quot; split evenly (7/16&quot; per side) should be reasonably easy to hide if the gate is door height (7' or so). If it's shorter, it will be more obvious, but there's only so much you can do.