J.R.R. Tolkien based Sindarin largely on the sound and structure of Welsh.
Sindarin is one of Tolkien’s principal Elvish languages in Middle-earth. It is associated especially with the Sindar, or Grey Elves, and became the common Elvish language of many characters in The Lord of the Rings. Tolkien designed it as a historical language with related forms, sound changes, and dialectal development rather than as a simple list of invented words.
Quenya, another major Elvish language, was influenced strongly by Finnish and also by Latin and Greek; it is not the answer to this question. Sindarin’s Welsh influence can be heard in features Tolkien admired, including its phonology and certain consonant mutations.
Tolkien was a professional philologist, so his languages were tied to imagined histories and peoples. He often revised them over many years. As a result, published forms can differ across drafts and editions, even though Sindarin’s Welsh inspiration is a well-established part of its design history.