The quotation is from the Bible in Matthew 6:21:
19 Do not store up for yourselves treasures on earth, where moths and vermin destroy, and where thieves break in and steal. 20 But store up for yourselves treasures in heaven, where moths and vermin do not destroy, and where thieves do not break in and steal.
21 For where your treasure is, there your heart will be also.
Matthew 6:19-21 NIV
The premise is that Jesus is telling his disciples that their focus should not be on worldly gain because the real treasure is elsewhere.
In Harry Potter, we know that Dumbledore feels great remorse over what happened to his sister, her death being one of the key reasons he never accepted the post of Minister of Magic. Placing this verse on her tombstone is his way of acknowledging that he missed out on the greater treasure due to his misplaced ambitions - as well as providing a warning along with some advice to any who may read it in the future.