You can do a gate like that. I did something like that, but put the hasp on the shed side and put the hinges on the post side.
For your run, I suggest corner posts and the post by the gate be a heavy wooden post, not a T-post. T-posts are great for intermediate posts, but not much good for structural support like you need at corners and at the end. Brace your corner posts with diagonals in line with the fence. There is a surprising amount of force on those from the fence. Brace the corner posts with diagonals before you stretch your wire and never try to stretch your wire around a corner. Always stretch it in a straight line. Otherwise you will break your posts.
To attach the welded wire to the building on the side away from the gate, I temporarily attached the wire to the end of the building with staples, but then put up a 1x4 over the end of the wire. I used long screws and screwed the 2x4 tightly to the building. Those screws were placed where they went through an opening of the wire fencing as insurance, but that is probably unnecessary. If you tighten it down, it won't go anywhere. I predrilled pilot holes to keep from splitting the 1x4. An advantage to this is that the sharp edges of the wire fencing are covered. I snag my clothing and skin less often this way.
Something else I did. That fence post at the gate needs support, especially if you hang the gate on it. I made that post "tall" and ran a horizontal brace over to the coop to keep it from shifting over time.
To hang the gate from the coop, you might need to first put a fairly wide board on the outside of the plywood to hold your hinges. This can be part of your corner trim.