The locks on the car are supposed to be simple, and when they are working correctly they can be once you get to know the car. But to a new owner the German saying "Why make it simple when it is easy to make it complicated?" can apply.
First, you have two keys, one that has an oval black plastic head, and one that is more square shaped. The oval one will not open the trunk or the glove box and is designated a valet key. You are supposed to hand it to the valet and be able to feel secure as he can't get into the trunk or glove box with it provided they were locked with the square headed key.
With the square headed key, you have access to everything. The glove box is always a manual locking affair as it has no vacuum powered features. The doors and the trunk, and the gas filler cap have vacuum acutated locks. The vacuum comes from an electrically powered pump on the floor under the right rear passenger seat. If the electrical power is off, like with a dead battery, you won't get a vacuum system response to the square headed key in the driver's door lock. You may have to start the car to get power to the vacuum pump.
Anyway, the key system works by following the action of the driver or front seat passenger door locks, and the trunk lock, using the vacuum assist. This means if you unlock the driver or front seat passenger door, the trunk, the gas filler cap and the other doors all unlock. If you lock the driver or front seat passenger door, or the trunk, all these things lock. However, for the trunk you get a special position to remove the key and take the trunk out of the circuit for the vacuum assist system.
The key only comes out of the trunk lock in the horizontal or vertical position. My manual, which is German so I have to be careful here when I translate, says to unlock all the doors from the trunk, you insert the key into the slot and turn it to the left (counter-clockwise) until it stops in the horizontal position, then turn it back to vertical and remove the key. The vacuum system will open the doors. To open the trunk, you have to push the button in with the key in it when the key is turned all the way counter-clockwise (slot in the button that the key goes into is now horizontal). To lock the doors and trunk from the trunk you insert the key with the slot in the vertical position, then turn it all the way clockwise to the horizontal position, and then back to the vertical position, and then remove the key. In this case the door locks and the trunk are set to operate in the follow the vacuum system mode.
To lock the trunk and keep it independent of the vacuum system (using the valet parking key feature), insert the key in the trunk lock button (with the slot presumably in the vertical orientation), turn the key clockwise to the stop in the horizontal position, and remove the key. In this position you need to manually unlock the trunk to get it open, which consists of inserting the key, turning it counter-clockwise 180 degrees, pushing in on the button, and lifting the trunk.
However, you can always insert the key, turn it to the unlock position , and while in that position, push in on the button, and get the trunk open. If that does not work you have some other problem that is not related to the vacuum system afflicting your trunk lock.
The gas filler flap opens by pushing in on the front edge of the flap. This will pivot the door open from the rear edge. If this does not work, you should still be able to get it to rock, and see the little pin in the middle of the rear vertical seam between the flap and the fender. Try starting the car and cycling the locks by pulling the button up and down on the driver's door, then, with the car still running, see if the flap will open. If not, the actuator is likely shot as others have noted above.
You can manually disconnect the lock by moving the plastic liner in the trunk on the passenger side and looking up behind this liner just below the trunk spring. There is a rod that goes to the gas filler flap area, and if you pull this aft you will unlock the flap. You need to check to see if the rod stays in that position (it should, but may not depending what the failure mode was). If the rod wants to go back into the lock position, you will need to hold the rod in the unlock position with one hand (left) and open the flap with the other, or get a little help from another body.
Sorry this was so long winded and I hope it helps you. Jim
1986 Euro 190E 2.3-16 (291,000 miles),
1998 E300D TurboDiesel, 231,000 miles -purchased with 45,000,
1988 300E 5-speed 252,000 miles,
1983 240D 4-speed, purchased w/136,000, now with 222,000 miles.
2009 ML320CDI Bluetec, 89,000 miles
1971 220D (250,000 miles plus, sold to father-in-law),
1975 240D (245,000 miles - died of body rot),
1991 350SD (176,560 miles, weakest Benz I have owned),
1999 C230 Sport (45,400 miles),
1982 240D (321,000 miles, put to sleep)