Let me put this as succinctly as I can.
It is only by the grace of God that we are able to return to Him, and not by anything we do. Period. End of statement. Full stop.
Mormons do not do good works to earn their way to heaven. There is no heavenly scoreboard keeping track of who has the highest score, and admitting those that have enough points. To even suggest this is to completely misrepresent LDS beliefs.
Now, let's step back and see what the kernel of truth is that is used as the basis for this fabrication.
To clarify this let me quote a scripture from the Book of Mormon:
23 For we labor diligently to write, to persuade our children, and also our brethren, to believe in Christ, and to be reconciled to God; for we know that it is by grace that we are saved, after all we can do."After all we can do" does not mean that we can work our way to heaven.
-- 2 Nephi 25:23
I understand this to mean that Heavenly Father wants us to do everything in our ability to do the right things, and make our sins right. Obviously we will fall short of perfection. No one can attain that other than Christ. But He expects us to put forth our best efforts. In so doing, he makes up the difference through the atonement. It doesn't matter if it is an inch or a mile, when we put forth our best effort it shows the faith necessary for the atonement to be applied.
Is this working your way to heaven? No. If it were, then we wouldn't need the atonement. We would just do lots of good things, and there you go. Done.
That isn't what we believe though. We believe that no matter how hard you work, you will never get yourself to where you need to be. It cannot be done. It is a defining feature of this existence. Thus the atonement of Christ is the only thing that can bridge that gap between us and God.
So when someone tells you "Mormons work their way to heaven", you can now confidently tell them that they are misinformed, and correct them.