The only free and comprehensive online etymological dictionary of the Spanish language
dañar (Verb) "to harm"

13th cent. From Latin damnare 'id.,' from the noun damnum (see daño).

Romance: Western Vulgar Latin: Asturian dañar, Portuguese danar, Galician danar, French damner, Italian dannare; Eastern Vulgar Latin: Romanian damna, dăuna

Superficially similar to Semitic words for sacrificial meat and sacrificed animals. A reconstruction in Proto-Semitic *d-b-ḥ- would imply a loan (cf. ð-b-H- in Möller 1970).

"Damnare means to afflict a damnum on somebody, a curtailment of his resources; from this stems the legal notion of damnare ‘to condemn’." ~ E. Benveniste, Indo-European Language and Society (1973)