My chihuahua does this once and a while when he gets excited, eats to fast, or sometimes seemingly for no reason, which indicates that environmental factors (allergens, toxins etc.) may play a role.
Reverse sneezing, or honking, is a spasm due to "irritation of the soft palate," according to my dog's breeder.
Chihuahuas seem to get it the worse (to the point where they look like they're going to pass out sometimes) since they have small tracheas that are prone to collapsing.
Jessie got it right when she said rubbing the throat or blocking one nostril helps. Friends have also told me that they learned how to pull their dog's tongue to stop reverse sneezing instantly but I think I'll pass, since this problem seems pretty innocuous (although I can't imagine how scary it must be for the dog).