If they have the drop on you mostly all you can really do is pray they are not a sociopath. Didn't work in that scenario.
There are techniques for disarming people who have guns pointed at your head. I'd have to have to try one in real life. It does require a bit of training as well.
Proxima est Mors, Malum Nullum adhibit Misericordiam