The Memory Potion is a potion that returns memories that have been erased.
The Memory Potion is located in a secret location that Whitelighters can access, the Memory Vault. This potion is even able to restore a being's memories of alternate timelines. Whitelighters come to the vault during retirement to retrieve their lost memories of their mortal lives.
In "The Source Awakens", Harry Greenwood and Mel Vera met in Seattle in Macy Vaughn's third altered reality and their brains flooded with memories from both their original reality and the new one, prompting the two of them to orb to the vault where they drank from the fountain to restore their memories. They then found Maggie Vera and restored her memories with the same potion.
When Macy altered reality to make a world where she remained dead, Mel, Maggie, and Harry retained their original memories due to the potion's protection.