The old saw about “don’t take a knife to a gun fight” is a lot more glib than it is practical. There are any number of reasons why a knife is a perfectly practical self-defense tool with long history of service in this role. There really isn’t a “knife vs. gun” argument any more than there is a “hammer vs. screwdriver” screwdriver argument. They are different tools for different applications.
Knives perform a different role than firearms. The primary role for firearms it so to defend yourself against threats that are at distance, where as the role for a knife is to deal with threats that are at contact or grappling distance. It becomes very difficult to access, draw and employ a firearm once the wrestling match has commenced.
Firearms do not function very reliably in the clench. If anything comes in contact with the slide while it is in motion it can convetr a high-capacity semi-auto into a single shot firearm. It is very easy to “limp wrist” a firearm when trying to shoot at an odd angle that might be necessary in a grappling situation, inducing a stoppage.
Safe Backstops can be pretty hard to find. One the wrestling match starts it can be tough to find a place to shoot the assailant where path of the bullet doesn’t intersect with some part of your body or a bystanders.
Knives are very hard to disarm. Generally speaking any part of the knife not being held by the operator is dangerous, where as firearm is only dangerous on the muzzle end. Most of the martial arts demonstrations you see are disarms of either somebody who is ‘threatening’ with a knife or is making a large committed strike. What you do not see too much of is somebody who can take away a knife that is making quick, rapid motions. Disarming a knife from somebody who is willing to cut you is a difficult proposition.
The knife defends the handgun. Defending against any sort of protracted gun grab become much easier if you can put a knife into your hand. While there are a number of elaborate handgun retention systems, generally if you lock down the gun and start cutting you will retain the firearm.
Knives are very easy to use. The basic instruction for defending yourself with a knife is to get your knife out and cut anything that comes toward you. As long as you are willing to do so, it takes a high level of skill for an attacker to mitigate that.
Knife vs. knife is consensual behavior. There are few circumstances where an assailant is going to have a knife and give you the opportunity to get your knife into the fight. If he was immediately willing to cut you he would have already been doing so. The point at which you have a knife duel is the point at which you are willing participant in a contest rather than a person defending themselves.
Knives destroy bio-mechanical structure. A solid cut from a knife is capable of penetrating clothing, skin, muscle, tendons and arteries. A good cut to an arm can disable a hand. A good cut to leg can prevent the leg from supporting any weight. Handguns can puncture arteries and destroy tissue, but targeting the extremities is not a very reliable way to do this.
Knives have a different set of legal restrictions. Depending upon the jurisdiction, the carrying of a knife may be more permissible than the carrying of a firearm. Both are deadly force tools and the employment of a knife still requires the same deadly force standard before it can be used. While a jury might be biased against knives, a competent attorney should be able to make the case that using a knife in a situation where a firearm could be used is pretty much the same thing.