How to add deck gate with offset 4x4's?
It looks to me like the offset is minor. I would hinge a gate underneath the existing grippable rail, mounting the hinges toward the stairs, and swing it to the post in the foreground. A standard gate latch should mount up and work just fine. If necessary, block out the latch as needed. 

                  ____
     []  []  []  |    |  []  []
                 |____|
                  | |   &lt;-- hinge location
                  | |
                  | |
                  | |
                  | |
                  | |
                  | |
                  | |
                  | |
                  | |
                  | |
                  | |
             ____ | |
[]  []  []  |    ||_|
            |____|***  &lt;-- latch location