you said it was recorded 3 1/2 months before closing.. I don't understand how you claim it was not known at closing.
did you purchase title insurance? The buyers policy wouldn't cover it.
Here is what I think (don't worry, I don't think a lot

)
Somebody reserched the title. Rather than reading the actual lien, they took the word of the county folks who CORRECTLY stated the lien does not transfer with the property (because it doesn't). The lien becomes payable by your grandfather or subsequent holders of interest as listed on the lien document. It states upon transfer that it becomes payable by grandfather or anybody in the list so, as far as the buyers title insurance goes, they have no lien to pay and shouldn't pay anything. The buyers are not liable for the lien either.
That leaves you. Now, depending on what your attorney told you, you might have a claim against him but I do not know what your attorney told you.
It actually should have been taken from your sales proceeds by the closing agent but I'm betting somebody (maybe your attorney) convinced them the lien died based on the
misunderstood (I suggest it was not erroneous but actually correct but misunderstood) statement from the county.