Compare the latch and hinge sides
A latch that catches only when you lift the gate is a clue to check sag and the condition of both hinges. Show the closed gate, then take close-ups of the latch meeting point and the top and bottom hinge. Tell us if it scrapes the ground or only sticks after wet weather.
Check whether the post is part of the job
Repositioning a latch may work if the post, hinges and gate are sound. If a post leans, hardware is pulling out, or the gate is visibly twisted, a latch move may only buy time. Tell us if the gate is part of a pool barrier or another safety enclosure so we can assess the required hardware and scope.
Avoid buying on latch appearance alone
Measure the gap and photograph the two mounting surfaces before buying. A lightweight garden latch, a locking gate latch and safety hardware serve different uses. If this is a simple yard gate, include any fence pickets or fasteners you want checked while we are there.