While the aforemented methods of grabbing the slide sound good in reason, the blow-back pressure of a fired bullet is stronger than anyone's grip strength. My father was a cop for over 15 years, and I believe his system is the best I've heard so far.
1. If the gun is pointed at your head for longer that 2 seconds, their goal is not to kill you, but to obtain something. Give it to them.
2. If the man pointing the gun at your head is unstable, which may be the case, remind him of his family, religion, and community. NEVER mention jail time.
3. If it becomes a worst-case senario, knock the gun away with as fast and little motion possible, and try for the knock-out. Do not grapple for the gun, it wastes time and leaves you exposed to any back-up weapon (knives especially).
I hope no one will ever have to use this information, but if in this situation, try to follow the above mentioned guidelines.