A word built on salt
English salary comes from Latin salarium. Wiktionary lists its meanings as a salary, stipend, allowance or pension, and describes it as formed from the adjective salarius, meaning of or relating to salt, which comes from sal, salt.
So the salt in the word is in the word's make-up. What is missing is the reason someone attached it to a payment.
The tidy story
A popular explanation says Roman legions were sometimes paid in salt. Wikipedia's article on salary calls that claim baseless, even though it is repeated a lot today. The same article says the link between salt and the word is simply unknown.
A softer version holds that soldiers might have received an allowance for buying salt. Wikipedia notes that even this finds no backing in ancient writers. It may be true, but nobody has the evidence.
What does survive
What the article does say is that the salarium paid to Roman soldiers set a pattern for work-for-hire in the Western world. It does not say what form the payment took. The same history left us the phrase being worth your salt.
That is a fair spot to leave an etymology: the word's parts are clear, its use for soldiers' pay is recorded, and the reason for the salt is still an open question.

