Photographs and videos posted on Twitter show John playing a piano in the middle of the station, surrounded by a throng of surprised fans.
The Rocket Man singer tinkled the ivories for a few minutes, before leaving a note on the piano which reads: "Enjoy this piano. It's a gift. Love, Elton John."
He posted a photo on his Instagram account, writing alongside the photo: "Surprise!! I popped into St Pancras International to christen the Yamaha piano which I donated to the station. Now everyone can have a play."
In a second photo he posted - of the message he wrote on the piano - he quoted a line from one of his hits, Your Song.
He wrote: " My gift is my song and this piano's for you."
Following the piano performance he thanked his fans and left the station.
Sir Elton is currently promoting his new album Wonderful Crazy Night, which is released on Friday February 5.
Ruth Swailes told the Press Association: "A colleague and I were just walking through the station and there was a bit of a crowd, then everyone started clapping and cheering. Elton sat down and started playing Tiny Dancer.
"He didn't sing, played for about five minutes, then got up and walked away, all very low key."
As the star left, he was photographed greeting a worker for British Transport Police. He signed an autograph and was snapped planting a kiss on the man's cheek.