A summary of a few ideas that I said pinch-hitting for a Chumash shiur.
The Gemarah Berachos (7b) says מיום שברא הקב"ה את עולמו לא היה אדם שהודה להקב"ה עד שבאה לאה והודתו שנאמר הפעם אודה את ד. The question is that Noach and the Avos offered korbanot as a show of gratitude to Hashem, so what does it mean Leah was the first to give thanks? One approach (in the Pardes Yosef) is that while in the past people had given thanks to Hashem for the good that occurred in their lives, no one acknowledged that the hardship, the bleakness was also something to give thanks about. Leah recognized that he should give thank even for the fact that she was שנואה because she merited to give birth to the majority of the shevatim due to her feelings of pain. Leah was the first to give thanks for the hardship as well as the salvation.
The Gemarah Sanhedrin (94a) says גנאי הוא למשה ושישים ריבוא, שלא אמרו ברוך עד שבא יתרו ואמר ברוך ה. What does the Gemarah mean, Klal Yisrael said an entire shirah? The Ketav Sofer says along the same lines of the previous answer. Yisro who was a ger, still felt for the Egyptians who were killed therefore, his 'ברוך ה was said as he experienced pain over the loss of the Egyptians Klal Yisrael did not give thanks for the pain they felt during the years of servitude.
This is the same idea as the Beis Halevi explains that משה did teshuva when he said אז ישיר for saying ומאז באתי אל פרעה לדבר בשמך הרע לעם הזה והצל לא הצלת את עמך. What is the teshuva? He understood how the greater shibud allowed the geulah to happen and he appreciated the hardship.
That is the אל הנסים includes ועל המלחמות for one must give thanks even for the war which led to the geulah. (However, the milchama is placed at the end for it is only after the salvation that one can appreciate how the the war, the difficulties led to the salvation.)
Another answer to the the question about how Leah was the first to give thanks offered by the Ketzv Sofer is that while there were people previously who said thank you, it was a one time event and then life moved on. Leah named her child as a form of thanks which would always be present. It is a peulah nimsheches of gratitude. What Leah teaches us it that one has to have the feelings of appreciation last forever. The Chapter in Tehillim (30) מזמור שיר חנוכת הבית לדוד is very interesting for the rest of the chapter talks about David being saved from illness, enemies etc. but there seems to be no connection to the opening statement about the inauguration of the Mikdash? Explains Rav Isser Zalman (intro. to Kodshim 2) that when David is composing a song for the inauguration of the Mikdash he doesn't just give thanks for the building of the Mikdash, he restates his feelings of indebtedness for all that Hashem had done for him in the past. He was constantly acknowledging all the chesed that Hashem did for him, he did not merely focus on the present event and forget the past.
Another answer (given by the Torah Temimah and others) is based upon Rashi on the Gemarah. Rashi says כיון שילדה בן רביעי הודית על חלקה שעלה לה יותר מן המגיע. In other words the uniqueness of Leah is that she said thanks for the fact that she had more children than she thought she deserved. What is the specialty of this form of gratitude? Rav Hutner (Pachad Yitzchak Chnukah 2:2) explains that the word for thanks is Hebrew, מודים, is the same word as agree, מודים. What is the relationship between these two ideas? He explains when one shows gratitude it is act of admitting that another individual's help was necessary. One is forced to admit they could not do it all by themselves but instead required the assistance of another. The essence of saying thank you is not just an act of expressing gratitude but is act of self nullification; an acknowledgment of a lacking in one's independency. The first one to express thanks in the ultimate form was Leah. She felt what she received was יותר מן המגיע לה, that she was undeserving, unworthy in her own stead, and everything she received was a chesed from Hashem, not something that was coming to her.
With this idea we can understand a Midrash here. The Midrash say לֵאָה תָּפְסָה פֶּלֶךְ הוֹדָיָה, וְעָמְדוּ הֵימֶנָּה בַּעֲלֵי הוֹדָיָה, יְהוּדָה (בראשית לח, כו): וַיַּכֶּר יְהוּדָה וַיֹּאמֶר צָדְקָה מִמֶּנִּי. דָּוִד אָמַר (תהלים קלו, א): הוֹדוּ לַה' כִּי טוֹב. דָּנִיֵּאל אָמַר (.דניאל ב, כג): לָךְ אֱלָהּ אֲבָהָתִי מְהוֹדֵא וּמְשַׁבַּח אֲנָה What does the admission of Yehuda have to do with the פֶּלֶךְ הוֹדָיָה of being thankful? In light of Rav Hutner, it is the same yesod. Every expression of thanks is a form of admission and the ability to admit to someone else stems from the הודאה of Leah.
Another point of note is that the Even Ezra says end of the possuk ותעמוד מלדת is because she gave thanks to Hashem and indicated he was satisfied. So, Hashem says if you are satisfied, you don't need anything else. Even when giving thanks it is still appropriate to continue to ask for more. That is why in Hallel, when thanking Haahem we say אנא ה הושיעה נא, הצליחה נא, for we continue to ask for more.