Why does salt enhance even sweet food flavors? Very interesting question. Many recipes, even those for candy, call for the addition of salt. And the truth is if you leave out the salt, the resulting dish or confection (or alcoholic drink) won’t have as much flavor as when salt is added. Why? Here’s a very good answer from redditor tyro17.
Each taste in the mouth uses different mechanisms to signal that particular taste, most of which involve the opening of sodium channels that cause signaling to the brain. Since salt itself (NaCl) increases the amount of sodium outside of the taste receptor cell, the gradient is stronger, and thus more sodium enters open sodium channels, causing more signaling for any particular taste.
via How does salt (NaCl) accentuate flavors in foods? : askscience.