Melisandre's prophecy came true at the end of Game of Thrones season 8, episode 3, "The Long Night," as the Red Priestess died after the conclusion of the Battle of Winterfell. Melisandre left Westeros in season 7, episode 3 with the promise that she would return the continent one more time - to die. She reiterated this upon her arrival in "The Long Night," telling Ser Davos that he did not need to execute her because she would be dead before sunrise anyway.
Unlike others in this episode, Melisandre didn't die in battle. After Arya successfully killed the Night King and ended the war, Melisandre took off the choker necklace that maintains her youth and walked out into the snow as an old woman. Davos looked on as Melisandre's age caught up with her, and she died. Earlier in the episode Melisandre had explained that Beric Dondarrion had finally died because he had fulfilled the Lord of Light's purpose for him, and it appears the same applied to Melisandre as well.
The Red Woman was key to Winterfell's defense again the army of the dead. While her initial gambit of giving the entire Dothraki army flaming swords didn't quite pay off (the Dothraki were slaughtered almost immediately), Melisandre later delayed the attacking wights by lighting the trenches on fire. Later still, she spurred an exhausted and frightened Arya back into action by reminding her what we say to the god of death, and also by reminding her of a prophecy that she would close many eyes - including blue eyes.
Melisandre is a priestess of R'hllor, the Lord of Light, who is one of the only gods in Game of Thrones that has offered concrete evidence for his existence (the Faith of the Seven is decidedly less impressive). R'hllor exists in duality with a god of darkness, death, and evil, and is ostensibly the "good" half of the duo - definitely so, if you ask Melisandre. However, we've also seen great cruelty done in R'hllor's name, most notably the burning at the stake of Shireen Baratheon, as an offering to clear the inclement weather in Stannis Baratheon's path.
The Lord of Light has the ability to grant extended life to his followers, and in turn his followers can grant extended life to others. For example, Thoros of Myr repeatedly brought Beric back from the dead, and Melisandre brought Jon Snow back to life after the mutiny at Castle Black. In the Game of Thrones season 6 premiere, Melisandre removed her necklace and revealed herself to actually be a very old woman. When she removed her necklace again after the Battle of Winterfell she looked even more withered, and died almost immediately - her light finally gone out.
Back in season 7, Melisandre said that her days of whispering in the ears of kings were done, indicating that she no longer has any part to play in the throne politics of Westeros. Having successfully staved off the advance of the army of the dead, her purpose is complete and her borrowed life is over.