Why does my throat spasm unexpectedly, like completely closing?

Serious, or not... The cause of this sensation have a variety of causes. If it is associated with difficulty breathing or asthmatic breathing, as seen in an anaphylactic reaction to something and potentially fatal. More likely, it is an exaggerated form of anxiety or a symptom of hysteria, in which the muscle in the pharyngeal area go into muscle spasm. Or an abnormal form of swallowing where muscles are dyskinetic.
Laryngospasm. The throat is spasmimg likely secondary to acid in the esophagus. This is quite common. Try using Prilosec one hour before breakfast and supper. Take it a few weeks and this problem should resolve. Try using an anti reflux diet and eat foods low in acid. Good luck.