I agree with what has been said above. Memorising a piece on the piano is achieved by a combination of factors for me, namely the following:-
1)Complete awareness of, and analysis of the harmonic progression and structure of the music both at the piano and from the score.
2)Re-inforcing the above by aural and visual repetition of both the music and visual references on the keyboard i.e. the shape of a broken chord or the flow of a melodic line.
3)Repeating the above methods with respect to phrases/sequences/recapitulations, modulations etc.
4)Aural and visual training of the ears and fingers to the point where they become a synthesis of each other.
5)Photographically remembering parts of the score i.e seeing the notes in your head.
6)Listening to recordings to help the memorisation process
7)Get to know the music totally and completely at and away from the piano.
8)Practice, practice and practice...repetition and consolidation of all the above.
Once all of these are achieved and the notes are finally learnt, then comes the hardest part....playing the music in an artistic and musical way that will communicate to and even move anyone listening.
Gae