Sanskrit was said to be revealed language, its grammar revealed by Shiva and so on. As @psynergy pointed out, the fact that it has been used for ritual, and spiritual purposes for millennia has strengthened the energetic field around it. It is called Devanagari - the language of the Gods - and this ties in with the revelation myth that surrounds it. I have heard Sanskrit sounds in some other non-earth dimensions during astral journeys, so there probably is something to this myth. In fact, that is what prompted me to invest a LOT of time to study Sanskrit.
At one point, when speaking with the current Dalai Lama in Seattle, he said: “you exude a lot of energy, that arises from your Sanskrit language”. That stayed deeply in my heart. He frequently suggests his students to learn the Buddhist mantras in original Sanskrit rather than their Tibetan and Chinese versions (which sound much different than the original Sanskrit ones).
The alphabet structure, the phonetics, all of these go hand in hand with the theory of Mantras, Chakras, Vedic idea of creation, etc. There is some inherent energy in the way these sounds are resonated as every letter is pictured to be a divinity. It is not always the meaning of the sound/word because a lot of bijas (seed sounds) have no meaning in the normal sense. If one looks at the evolution of Sanskrit, this was designed to be a language for rituals, unlike probably any other language in the world - it was never really for mundane communication. At most periods, while Sanskrit was used for spiritual work, there were always other languages used for secular communication like Pali, Paishachi, etc.
Latin seems to be another such language based on what I have heard from my friends who are deep into Occult work.
Also, mantras are not potent because they represent a meaning, in the normal sense of the world. They are potent because they represent the sound/light aspect of the Deity which was revealed to the seer of the mantra. A mantra is called bija (seed sound) because it contains in itself the full manifestation of the associated deity, which manifests fully when nurtured like a plant through dedicated practice. People like Dhyanguru and other charlatans make up their own mantras and people think they get to benefit from them. A lot of them are just placebo, a few cases could be energetic effect because a lot of people believe in it and that creates a dull field around it which can be accessed. This effect would probably work (positively or negatively) even with simple words like Coke if repeated. Genuine mantras are a whole different thing.
Traditionally, correct pronunciation has been stressed often, and a story is popularly narrated to illustrate this point. A certain man who was reciting mantras constantly lost his wives to diseases. He then reached out to his Guru who made him recite the mantra. He said, “bharyam bhakshatu bhairavi” - which means, “May Bhairavi the fierce one eat my wife”. And that happened lol. The actual mantra was, “bharyam rakshatu bhairavi”, which means, “May Bhairavi the fierce one protect my wife”. Hence, caution is needed when practicing fierce archetypes like Kali, etc. as these practices are not undertaken by beginners.
Another such tale. A powerful seer Tvashta wanted to have a son who would kill Indra, the great King. He performed a ritual reciting a Vedic mantra, 'Indra shatrurvardhasva" - which meant, “May Indra’s enemy (my son), grow and prosper”. However, the way he intonated it, the meaning changed to: “May Indra, my son’s enemy, grow and prosper” and eventually Indra ended up killing his son. Hence it is said, “Yajamanam hinasti” - incorrectly intonated mantra destroys the reciter. Of course, this is more applicable to severe mantras than benign ones.