Is there a source in the Torah for the belief that words a person speaks can change the course of their life for better or worse? Meaning can someone seal their own fate with the words that they choose to speak?
The Gemara in Kesubos 8B, Berachos 19A and 60A states that a person should not say something bad will happen as it is considered "opening your mouth to the Satan" which can cause the thing to actually happen, and it is derived from a Passuk in Isaiah 1:9;
אָמַר אַבָּיֵי: לָא מִבְּעֵי לֵיהּ לְאִינָשׁ לְמֵימַר הָכִי, דְּאָמַר רַבִּי שִׁמְעוֹן בֶּן לָקִישׁ, וְכֵן תָּנָא מִשְּׁמֵיהּ דְּרַבִּי יוֹסֵי: לְעוֹלָם אַל יִפְתַּח אָדָם פִּיו לַשָּׂטָן.
Abaye said: A person should not say that, as Rabbi Shimon ben Lakish said, and it was also taught in the name of Rabbi Yosei: One must never open his mouth to the Satan, i.e., one must not leave room for or raise the possibility of disaster or evil. This formula, which states that the entire debt owed due to his transgressions has not been collected, raises the possibility that further payment will be exacted from him.
וְאָמַר רַב יוֹסֵף: מַאי קְרָאָה — שֶׁנֶּאֱמַר: ״כִּמְעַט כִּסְדוֹם הָיִינוּ״, מַאי אַהֲדַר לְהוּ נָבִיא — ״שִׁמְעוּ דְבַר ה׳ קְצִינֵי סְדוֹם״.
And Rav Yosef said: What is the verse from which it is derived? As it is stated: “We should have almost been as Sodom, we should have been like unto Gomorrah” (Isaiah 1:9), after which what did the prophet reply to them? “Hear the word of the Lord, rulers of Sodom; give ear unto the law of our God, people of Gomorrah” (Isaiah 1:10).
The Gemara in Moed Kattan 18A (mentioned in a different answer) has a similar statement, although with a different language;
דְּאָמַר רַבִּי יוֹחָנָן: מִנַּיִן שֶׁבְּרִית כְּרוּתָה לַשְּׂפָתַיִם — שֶׁנֶּאֱמַר: ״וַיֹּאמֶר אַבְרָהָם אֶל נְעָרָיו שְׁבוּ לָכֶם פֹּה עִם הַחֲמוֹר וַאֲנִי וְהַנַּעַר נֵלְכָה עַד כֹּה וְנִשְׁתַּחֲוֶה וְנָשׁוּבָה אֲלֵיכֶם״, וְאִיסְתַּיְּיעָא מִלְּתָא דַּהֲדוּר תַּרְוַיְיהוּ.
This is as Rabbi Yoḥanan said: From where is it derived that a covenant is made with the lips, and that one’s speech has the power to change events? For it is stated: “And Abraham said to his young men: Stay here with the donkey, and I and the lad will go onward; and we will worship, and we will come back to you” (Genesis 22:5). Abraham said this even though he thought that he was going to sacrifice his son as an offering and that Isaac would not be returning, yet this had an influence and they both came back
Tosfos on that Gemara questions why it brings a proof from a case of something good happening, to a case of something bad happening, he asks that it would be more appropriate to bring the proof as the Gemara in Berachos;
ואיסתייעא מילתא דהדור. תימה דלמא מדה טובה מרובה והוה ליה לאתויי הא דאמר עולא בעלמא (ברכות דף יט. ע"ש) לעולם אל יפתח אדם פיו לשטן שנאמר שמעו דבר ה' קציני סדום כו' (ישעיהו א׳:י׳)
The Maharsha answers that the difference is whether the words are being spoken about yourself or others, he further explains the rationale behind the fact that words can cause disaster, as being related to the fact that it is like the person is saying testimony on himself that he deserves such and such;
והנראה ליישב את זה דההיא דאל יפתח פיו לשטן איירי כשהאומר כלל את עצמו באותו פורענות ורעה כדמוכחי הענינים דהתם והטעם בו כמ"ש בע"י שלא יתן פתחון פה לשטן לקטרג ולומר הודאת בעל דין כמאה עדים דמי ולא נשאר מקום למדת הרחמים להאריך אפים כו' ע"ש וליכא לדמויי לההיא דהכא איירי בשגגה היוצא מדברי האומר ברעת פורעניות או בטובת זולתו כדמוכח הענין פנחס לשמואל והטעם בו כאומרם ניבא ואינו יודע מה ניבא וכפרש"י בחומש ונשובה נתנבא שישובו שניהם עכ"ל והשתא אין סברא לחלק בין מידה טובה למדה רעה בנבואה היוצאת מדברי האומר בשגגה
The Chinuch in Mitzvah 231 explains the reason for the prohibition of cursing people to be related to the power of speech to affect outcomes;
אף על פי שאין בנו כח לדעת באי זה ענין תנוח הקללה במקלל ואי זה כח בדבור להביאה עליו, ידענו דרך כלל מכל בני העולם שחוששין לקללות, בין ישראל בין שאר האמות, ויאמרו שקללת בני אדם גם קללת הדיוט תעשה רשם במקלל ותדביק בו המארה והצער. ואחר דעתנו דבר זה מפי הבריות נאמר כי משרשי המצוה, שמנענו השם מהזיק בפינו לזולתנו כמו שמנענו מהזיק להם במעשה, וכעין ענין זה אמרו זכרונם לברכה (מו''ק יח א) ברית כרותה לשפתים. כלומר, שיש כח בדברי פי אדם
Even though we do not have the power to know in which way a curse impacts upon the one cursed, and with what power within speech there is to bring [that impact] upon him, we know more generally that people are concerned about curses - whether Israel or other nations - and say that curses of people, and even curses of commoners, have an impact on the one cursed and attaches malediction and distress to him. And since we know this thing from the mouth of the creatures, we will say that it is from the roots of the commandment that God prevented us from injuring others with our mouths, [just] like he prevented us from injuring them with action. And similar to this did they, may their memory be blessed, say (Moed Katan 18a), "A covenant is made with the lips" - meaning to say that there is power in the words of a person's mouth
ואפשר לנו לומר, לפי עניות דעתנו, כי בהיות הנפש המדברת שבאדם חלק עליוני, וכמו שכתוב (בראשית ב ז) ויפח באפיו נשמת חיים. ותרגם לרוח ממללא, נתן בה כח רב לפעל אפילו במה שהוא חוץ ממנה, ועל כן ידענו ונראה תמיד כי לפי חשיבות נפש האדם ודבקותה בעליונים כנפש הצדיקים והחסידים ימהרו דבריהם לפעל בכל מה שידברו עליו, וזה דבר ידוע ומפרסם בין יודעי דעת ומביני מדע
And it is possible for us to stay - according to the paucity of our intelligence - that since the speaking soul in man is the elevated part, and as it is written (Genesis 2:7), "He blew into his nostrils the breath of life," and it is translated (by Onkelos) as "a speaking spirit"; He gave it great power to impact even on that which is external to it. And hence we have known and it is always seen that to the extent of the importance of a man's soul and its clinging to the elevated things - like [is the case with] the souls of the righteous and the pious - will their words be quick to impact upon all that they speak about
The Rashba in 1:408 explains that words can effect an outcome is a known fact and proven in Gemara but the reason is above our understanding.
Another passage that is similar is derived from the Passuk in Koheles 10:5
יֵ֣שׁ רָעָ֔ה רָאִ֖יתִי תַּ֣חַת הַשָּׁ֑מֶשׁ כִּשְׁגָגָ֕ה שֶׁיֹּצָ֖א מִלִּפְנֵ֥י הַשַּׁלִּֽיט׃
Here is an evil I have seen under the sun as great as an error committed by a ruler
The Gemara Kesubos 23A explains this as the reason for the daughters of Shmuel becoming captives, and on 62B it is the reason for the son in law of Rav Yannai to pass away, In Bava Metzia 88A explains it as the reason for the death of Ameimar. There are other instances of these kind of situations as well, in Yerushalmi.
There are many Halachos that are recorded, just to avoid saying something that might cause an adverse outcome, here are a few:
Darchei Teshuva YD 20:1 - not to show on ones body how to do shechita (Gittin 57B)
Shulchan Aruch YD 376:2 - saying "shev" to a sick person, The Rema also mentions other things not to say to prevent opening up to the Satan.
A clear example of this phenomenon in Chumash is Yaakov Aveinu near the end of Parashat Vayetzei, in response to Lavan's accusation that he had stolen the teraphim,
"עִ֠ם אֲשֶׁ֨ר תִּמְצָ֣א אֶת־אֱלֹהֶ֘יךָ֮ לֹ֣א יִֽחְיֶה֒ נֶ֣גֶד אַחֵ֧ינוּ הַֽכֶּר־לְךָ֛ מָ֥ה עִמָּדִ֖י וְקַֽח־לָ֑ךְ וְלֹֽא־יָדַ֣ע יַעֲקֹ֔ב כִּ֥י רָחֵ֖ל גְּנָבָֽתַם׃
But anyone with whom you find your gods shall not remain alive! In the presence of our kin, point out what I have of yours and take it. Jacob, of course, did not know that Rachel had stolen them." (Translation Sefaria, emphasis my own)
Rachel Imeinu died not long afterwards, and you don't need to be the Ramban to see the link between the utterance and its effect (to be sure this is widely discussed in the relevant Mephorshim).
The Gamara in Kesubos 8Bsays
אָמַר רַב חָנָן בַּר רַב: הַכֹּל יוֹדְעִין כַּלָּה לָמָּה נִכְנְסָה לַחוּפָּה. אֶלָּא, כׇּל הַמְנַבֵּל פִּיו, וּמוֹצִיא דְּבַר נְבָלָה מִפִּיו, אֲפִלּוּ נֶחְתַּם לוֹ גְּזַר דִּינוֹ שֶׁל שִׁבְעִים שָׁנָה לְטוֹבָה — נֶהְפָּךְ עָלָיו לְרָעָה.
Rav Ḥanan bar Rav said: Everyone knows why a bride enters the wedding canopy. It is the step before consummation of the marriage. However, one should not speak about it unnecessarily, as anyone who profanes his mouth and issues a matter of profanity from his mouth, even if a positive decree of seventy years was sealed for him, nevertheless, it is transformed for him into an evil decree.
We see from the gamara just by talking about something we can change our destny for the bad.
Found in Sanhedrin 102a, in which Yehu states that he will also worship Baal [II Melachim 10:18] (only in effort to trick the priests), ends up supporting avodah zara [ibid 10:31]
This is the source of the 2nd example's quote of "a covenant was made with the lips"
This may not be a fulfilling example, so I offer
I don't remember the source for this but I recall the context. It was given in example to highlight the power of specificity of words during tefillah, and the sentiment was to be specific but not too specific.
In Bereshit 22:5, Abraham says to his servants
Stay put with the donkey; me and the boy will go up, we will worship and then we will return to you.
The person who wrote this book then said
and so a covenant was made with the lips
which was footnoted to Sanhedrin 102a.
And thus Abraham returned with Issac, since he said "and [we will] return to you"
Zohar Bamidbar 246A: (Translation Rahmiel-Hayyim Drizin)
There are three who cause harm to themselves, two [harm themselves] in this world, and one in the other [spiritual] world. And these are: 1 one who curses himself, as we have learned; an official is appointed onto man [to constantly supervise his deeds and he goes up and reports Above] and when a man curses himself this official together with his seventy appointed subordinates take that word and respond 'amen,' (to affirm that the curse should be fulfilled) and they raise it up on high and judge it. And [if it is held to be proper that this curse be upheld] he [this official] follows him until he makes it happen and so completes that very curse [that the person cursed himself with].
Who do we have as a better example than Moses, who said: "and if not, blot me, I pray you, out of Your book which You have written." (Ex. 32:32) This he said as a necessity [for the sake of Israel], and although G‑d fulfilled his wish [and forgave Israel], nevertheless he was not spared punishment, for it has already been noted that [his name] is not mentioned in the Torah portion of Tetzave, but has been blotted out from there. And this has already been taught.
And who do we have that is greater than King David, who said: "I said: I will take heed to my ways, that I sin not with my tongue: I will keep a curb on my mouth, while the wicked is before me." (Psalms 39:2) What is the meaning of "while the wicked is before me"? This refers to that official who is appointed over one [who curses himself] and takes that word to harm a man.