If you eat a mostly grain diet, as many poor farmers have from the neolithic to today, you must have extra salt to survive. Neither wheat, corn, nor rice gives you anything like the amount of salt people need. I am not sure how people discovered this, but salt is one thing you can crave, so perhaps it was just that when people started eating a lot of bread and porridge they started craving salt. Because salt was crucial for life but not available everywhere, it was valuable. Salt mining on a large scale has now been dated to before 4500 BC in Azerbaijan, on the basis of stone tools found in ancient mines. Exploitation of these mines was intense by 3500 BC; numerous tools and potsherds dating to that period have been found. The salt mines of Switzerland seem to be about as old, although I believe the oldest certain date from those mines is around 4000 BC. The picture above shows a famous salt operation in Peru, where hot salty water rising from a mountain spring is allowed to evaporate in special terraces.
Since salt is something people had to have but often could not make for themselves, governments across Eurasia have collected salt taxes from the date or our earliest written records.