The first thing is to make the gate open.
Check the commmand reference and learn about the commands nearestObject and animate before doing anything else.
Now make a new test mission. Place the player unit near the gate you want to open. Follow HateR_Kint's advice and place a gamelogic right on top of the gate. Name it gate_keeper_1.
Now create a trigger like this:-
Area: 50 x 50
Activation box: whatever
Countdown: 3 3 3
Condition: true
On activation: (nearestObject [gate_keeper_1,"FDFrajapuomi"]) animate ["keppi",1]
(I'm not familiar with this island but I presume we know that FDFrajapuomi is a gate that can open and keppi is the magic spell that opens it.)
Right, now test the mission. Look at the gate. 3 seconds after the mission starts the gate should open.
Lets assume that works.
Now create a truck with driver, say 200m away. Give him a move waypoint just in front of the gate. Now move the trigger over the gate area: make it smaller, say 10x10 - you'll have to experiment to get the right size. Hit F2 and drag and drop a blue line from the trigger to the truck. Open the trigger and edit it like this:-
Area: 10x10
Activation box: Vehicle present
Countdown: 3 3 3
Condition: this
On activation: (nearestObject [gate_keeper_1,"FDFrajapuomi"]) animate ["keppi",1]
Now watch the truck drive up to the gate and stop: watch the gate open.
Now, back to the mission editor and give the truck a second move waypoint, 200m past the gate. Open his first waypoint and change the timeout fields to 10 10 10. Test again: this time he should wait for the gate to open, then drive through.
Now go back to the trigger. Place it very close to the gate, so that the area on each side of the gate is about the same. Add this to the trigger:-
On Deactivation: (nearestObject [gate_keeper_1,"FDFrajapuomi"]) animate ["keppi",0]
Now add a sentry standing beside the gate. Preview the mission and admire your handiwork.
I just hope it works.
These are very detailed instructions so I've probably forgotten something. Follow them carefully, but at each point think about what you are doing and make sure you understand it. You may have to change some of the instructions to make it work: experiment!
We'll worry about making the guard do stuff later.