All of the music in "Heaven Sent" was composed by Murray Gold, specifically for the episode.
At this point the name of the piece is not public knowledge. For a name you'll have to wait for the Series 9 soundtrack or its track listing, which aren't likely to come soon.
In the mean time - someone has uploaded a sound clip from the episode with partial voice cancellation to YouTube: Unreleased Music - The Mysterious Castle. This track is not present in the video linked in the other answer.
EDIT: The Series 9 soundtrack is out as of April 27, 2018. The album is available on Spotify at spotify:album:6akYPKZA8VbD9Hmj6q21fN, though it seems the music you're asking about falls between tracks 1 and 2 and isn't on it. :(