Take a thin metal ruler or a thin screw driver and try to push in the latch. This will bend the latch so it'll open, then when it's fixed, you just bend it back.
On many more recent cars (since 1985) the first aid is to open the trunk, locate the tank cover cable, and ease back on it whilst trying to lift the cap. If that opens it, feel for cover spring action; the spring is on the side opposite the latch and often fatigues in half. These springs are almost impossible to find. If the cover won't open it may be warped due to a zealous station attendant etc. Usually you can unwarp it with care not to foul up the hinge.
Otherwise, the cable has slipped on its clamp at one end or the other. Usually the cable needs to be replaced by a mechanic.