Latin salarium derives from sal, salt, originally money for Roman soldiers, connected by ancient sources to the purchase of salt, a precious preservative and trade good.
Assessment: The etymology from sal is documented and undisputed.
Stories
Soldiers were paid in salt
The popular version goes further: legionaries were literally paid in salt, hence "worth his salt."
Assessment: No ancient source says salt replaced money. A modern embellishment repeated so often it feels like fact.
Interesting claims
The state always salts the workers
The claim with an edge: from Rome's salarium to France's gabelle salt tax to Gandhi's salt march, governments have always monetized the one thing everyone must consume. Salary, on this reading, encodes the state's oldest trick: control the necessity, and you control the payer.
Assessment: As history of taxation, partially true: salt was taxed brutally for centuries. As etymology of power, it is a metaphor doing the work of an argument. The word remembers salt, not conspiracy.
Sources and further reading
Pliny the Elder, Natural History 31.41, salarium and salt
OED, salary, from Latin salarium; the paid-in-salt detail is folk etymology
Worth asking
What does it say about value that salt, not gold, named the paycheck?