By refusing the One Ring when Frodo offers it to her, and accepting that her own powers will fade, Galadriel proved herself worthy to return to the Undying Lands.
This is not outright stated, but suggested strongly by Galadriel's own words at that time:
I pass the test. I will diminish, and go into the West, and remain Galadriel.
Tolkien says this in his Letter #320Letter #320:
Galadriel was a penitent: in her youthyouth a leader in the rebellion against against the Valar (the angelic guardians). At the end of the First Age she she proudly refused forgiveness or permission to return. She was pardoned pardoned because of her resistance to the final and overwhelming temptation temptation to take the Ring for herself.
However, note that the history of Galadriel underwent several revisions in Tolkien's writings; in some of them (but not the one the SilmarillionThe Silmarillion is based on), Galadriel is entirely innocent of the Kinslaying and goes to Middle-Earth independantearth independently of FeanorFëanor and the rest of the Noldor; in those versions she did not need an explicit pardon, but stayed in Middle-Earthearth because she loved LothlorienLothlórien too much to leave.