Well, I will say handguns are easier to take away than knives. Yes I have experience on both accounts.
Hopefully were talking about CQB Close Quarter Combat and not like say 20 feet away!!!!!!
First off you don't necessarily have to take the pistol away from the attacker to neutralize the threat against you. There are tricks of the trade such as pushing on the barrel of a 45 semi-auto which will cause it not to fire, grabbing the cylinder of a revolver and blocking the hammer spur of a pistol from falling.
Remember the projectile only comes out one way and that hole is pretty small so your chance of controlling the weapon and staying out of harms way is much greater than with a knife. Plus it is actually easy to use the pistol against the attackers own hand causing great pain when making a disarm. (Yes it hurts like HELL!!!)
Now a knife can cut many ways and it doesn't just cut in one direction and it also has more surface to hurt you with. Take the barrel hole of a pistol, 1/4 inch or so but a knife blade is probably 3 to 5 inches long. Now it is very difficult to use the knife against the person’s own hand to disarm so you need to control the hand/wrist unless you want to grab the blade because there's not much else to grab on a knife.
I say most Martial Arts gun-disarms are as lame as their knife-disarms so if you want to learn gun-disarms then go to a CQB pistol expert. Massod Ayoob has one of the best courses in the world for this.