If the gun's right up on your head i would knock his hand to the side and duck at the same time incase it goes off. Keep your hand on his wrist and try to twist it and mabey punch him a few times and eventualy he'll drop the gun. If the gun ends up in your hands THROW IT as hard and as far as possible and if it ends up on the ground kick it a safe distance from the both of you.

Personaly if someone pulled a gun on me i would be PISSED so once the gun's out of reach do your best to kick the hell out of him and teach him a lesson. Do whatever you have to do beat him down and keep him down. Once he's down or gone or whatever go get the gun and take it to a body of water or a nearby dumpster to dispose of it.

It's a risky thing to do (disarming) But most people wouldn't expect you because most people would be scared stiff. So you can ethier:

1. Grab his wrist and pull it away from your head and duck and take your elbow to his ribcage repededley. Once he's in even a little bit of pain do whatever you have to (Snap his wrist, Bite Break hit pull ect...) To get the gun out of his hands.

2. Shuv the hand with the gun aside and hold it away from you and punch as hard as possible in the face then disarm gun.

These are the ways i personaly would do it. They are very risky but atleast you'd die (or be severley injured and if its a headshot most likely paralyzed) Trying.