How would the outcome of The Epic of Gilgamesh have changed if the title character succeeded in retrieving the magic plant?
If we understand the lesson that Gilgamesh learns in this episode of the epic as being a lesson of humilty (as nearly all of his lessons are), we can presume that success in returning with the magic plant would have failed to teach him the lesson.
As in any quest story, the object of the quest has two values, a narrative value and a symbolic value. The symbolic value can usually be interpreted as relating to wisdom. The hero undertakes a quest to attain an object (a fleece; a goblet; a flower; etc) then returns transformed, regardless of whether he or she possesses the object. The hero is changed and it is this change that he or she brings back to the village or city.
As a result of his adventure, the hero gains some knowledge of the world, and his return to society allows him to share his newfound knowledge with his fellow citizens, thus improving society at large.
The knowledge that Gilgamesh receives as a result of his failure in this episode is a knowledge of his limits; a lesson in humility.
Had Gilgamesh succeeded and procured eternal life for his people, he would have no reason to feel that he has any limits to what he can accomplish. In his failure, Gilgamesh learns that even though his efforts were aimed at doing a good deed for the welfare of his people, there is still a hubris to the act. He is a hero, but he is none-the-less capable of failure.
This is a lesson that offers Gilgamesh a tranformative insight.
Gilgamesh's lesson is that humans, though they cannot escape their mortality, can be transformed through experience.
This hubris (bold pride/overconfidence) is a part of the character of Gilgamesh. Overcoming this pride is one of his greatest challenges. Enkidu helped teach Gilgamesh this lesson early on in the epic. In the end, Gilgamesh has to learn it on his own and he does. He comes back, not with eternal life, but with a newfound wisdom.