Having a repertoire of songs that you can play at a moments notice is the goal of most pianists.
To be able to recall hundreds of songs from memory is not some kind of magic trick. The kind of memory recall needed to bang out just about any tune you hear requires training and practice.
Too often I've seen students try the "brute force" method of song memorization. You know what I'm talking about...the 6 hour marathon practice session where you keep getting madder and madder at yourself for not being able to memorize the darn song!
This method of memorization is usually performed by trying to memorize notes or where the hands should be placed. Maybe you've even tried to memorize the names of the chords and their order?
If you've been frustrated by this (I know I used to be) you'll be happy to know that there is a better way to build and memorize your piano repertoire.
It's called analysis. Or, the "fancy" term is harmonic analysis.
Analysis is the process of looking at the song and creating a mental schematic of how the chords move within in a progression. Basically, you are memorizing a progression of chords rather than one chord at a time.
I've created a lesson on just this: Analysis, Memorization and Transposition.
If you want to improve and grow your piano repertoire, learn to analyze songs.
Learning how to analyze a song is more an art than a science. It takes time, patience and practice. Please give yourself a generous helping of all three!