How can a person come to know that they have done enough good works to merit being with God when they die?
God does not keep a score sheet with zero to 100%, and allocate each good deed a percentage of the minimum acceptable quota. Nor would it be beneficial for us to try to keep such a score sheet. God judges us the way we ARE, not just by what we DO. For instance, we read in the Book of Moroni—
For behold, God hath said a man being evil cannot do that which is good; for if he offereth a gift, or prayeth unto God, except he shall do it with real intent it profiteth him nothing. For behold, it is not counted unto him for righteousness. For behold, if a man being evil giveth a gift, he doeth it grudgingly; wherefore it is counted unto him the same as if he had retained the gift; wherefore he is counted evil before God. (Moroni 7:6-8)
The approach given by God is to focus on others rather that on yourself. President Spencer W. Kimball, in speaking to missionaries, said it this way—
“You are not there for your own comforts and conveniences and desires. You did not go to see the world or get experiences. You went to forget yourself into immortality, and while in total forgetfulness of yourself, you would bring many to total conversion to the truth” (Spencer W. Kimball, The Teachings of Spencer W. Kimball, edited by Edward L. Kimball, p.581).