Allow an existing situation to remain in spite of new rules which would otherwise not be permit it. Typically used when laws change but do not effect already existing situations that would otherwise, under the new law, be banned.
“Wood-burning fireplaces were outlawed a few years ago, but luckily mine was grandfathered in so I can legally use it.”