Often we find gezeiros d'rabbanan designed as preventative measures against more serious transgressions.
However, if nowadays the reasoning behind the gezeira does not apply, it seems that sometimes we say "batla ta'am batla takana"- if the reason no longer applies, neither does the enactment- and sometimes we do not say this, but rather continue to obey the enactment even after its reasoning is no longer applicable.

For example: On the one hand, with regard to the takana not to lend money to gentiles with interest so as not to become involved in business with non-jews and become familiar with their way of life, we say that today one may do so even if not necessary for his livelihood (the loophole offered by chazal), since we are all anyways involved in business with non-jews.

Also, with regard to dancing on Shabbos, Tosafos (beitza 30a ד"ה תנן) hold that today (at least in their day) since people are not experts in musical instrument repair, there is no reason left to continue the takana.

On the other hand, we find that people still practice mayim acharonim after meals even though the danger described by chazal no longer exists. We find that people are careful not to depict the full sun or moon, even though celestial worshipers have virtually ceased to exist as well. Also, some insist that it is still prohibited to do laundry on Friday even though laundry is much quicker today than it was in Ezra HaSofer's time.

The question is: Is there a proper distinction between two types of rabbinic enactments that allows us to distinguish whether or not continuation of the enactment is dependent on the reason it was enacted? [Please cite sources.]

NO source but the basic Idea is certain ones besides for the Physical aspect like Melech sodomis there are Kabbalistic implications and hence the Gezarah stays and Avodah Zarah in general is more stringent
–
SimchasTorahMay 1 '11 at 22:10

Are you saying "kabbalistic implications" with regard to melach sodomis specifically, or to takanos in general? If so, the leniencies need to be justified.
–
jakeMay 1 '11 at 22:15

The simpler answer is to just reject Tosfot by dancing, and to note that the other loophole is built into the system.
–
Double AA♦Jan 2 '13 at 15:48

He even says that gzeiros to prevent an issur can never be nullified, though I'm not sure if everyone agrees to that.

But as a general rule, a gzeira stands even if the reason no longer applies.

The Ra'avad questions the Rambam from the fact that R' Yochanon cancelled certain takanos after the churban, so you see a beis din can cancel an earlier takana even if it's not greater than previous one, if the reason no longer applies.The Kesef Mishna (I think) says that R' Yochanon's Beis Din was greater, while the Radvaz offers another answer: The Rambam was just discussing standard gzeirso that don't mention their reason. However, if the gzeira mentions the reason, it can be cancelled once the reason no longer applies (it would still require a beis din though). According to the Radvaz, you could perhaps get a beis din together to cancel certain specific takkanos that mention their reason.

Those are the basic principles, what about the practical cases?

In general, taking medicine is assur on shabbos lest you grind medicine. In recent times, people stopped grinding their own medicine, yet modern poskim still forbid taking medicine on shabbos. This fits with the general principle that gzeiros still stand even if there reason doesn't.

Sometimes common practice will seem to go against a specific gzeira. In such cases, it is common for tosafot to explain common practice, sometime with a strong justification, sometimes a bit more dochek.

I have not looked into the issue of lending with ribbis to non-Jews, but it seems many of those gzeiros in Meseches Avodah Zarah were not fully kept in Europe.

Many poskim express wonderment at the Tosafos that permits dancing and clapping on shabbos. R. M. Feinstein says that in a case where there's some [external] cheshash (such as mayim geluim from snake poison), the gzeira would no longer apply once the reason is gone. However, the gzeira against dancing is against the action itself, and it should stand no matter what. He feels the Tosafot should not be relied upon, but feels bound to provide some explanation since the Rema and common practice allow it:

He suggests its as if the gzeira didn't spread, though its a bit unclear how that works. He then goes on to discuss how its as if a virtual gathering or rabbis annulled the decree, but says a baal nefesh should be machmir.

The Aruch haShulchan takes a different approach, and tries to justify common practice by claiming that modern clapping and dancing might not have been included in the takana, since its less in sync with the song.

Mayim Achronim is easier to explain. If it is just because of the danger of melech sdomis, then if the danger no longer exists, the issur may end. It's just an external cheshahs just like mayim geluim, etc. The question is just if there's other reasons for mayim achronim (such as having clean hands), and whether the danger is really gone.

In conclusion, the rule is that gzeiros apply even if the reason no longer applies, but poskim may try to find kulos to justify common practice. So if modern circumstances are different they may not have been included in the takana. If a gzeria is just because of an external chesahsh, it's easy to say it ends once the reason ends.

Thank you for this thorough answer. Re youre last sentence, doesn't that mean yom tov sheni shouldn't still be in force?
–
Monica Cellio♦Jan 8 '13 at 18:59

I'm not sure exactly how it is defined, but I don't think that's considered an external cheshash. The fear there was people wouldn't know the day, not that some other force would threaten them.
–
Ariel KJan 8 '13 at 19:20

But today we do know the day, very precisely.
–
Monica Cellio♦Jan 8 '13 at 20:35

Right, but it's like a regular gzeira which doesn't end, since it's not based on an external cheshash. R. Moshe discusses a couple of examples in his teshuva, so you can see where Yom Tov Sheni would fall in.
–
Ariel KJan 8 '13 at 22:00

@MonicaCellio When the Gezera was enacted, they knew the day as well. The fear was that at some later point there would be persecution or something and people would lose track in far flung places. See Bavli Betza 4b at the bottom. Back when they didn't know the day, everyone agrees they had to keep two days, as it is a doubt about a Torah prohibition. (The same would apply nowadays if you're on an island (or concentration camp) and you forget if a certain month had 29 or 30 days, so when you get to Yom Tov you aren't sure what day it is.)
–
Double AA♦Jan 10 '13 at 7:19

If you're looking for a perfect theory of everything it may take a lot of mental gymnastics, but in addition to the above excellent answers, here are a few pointers:

There are a whole host of rabbinically-prohibited activities on Shabbos known as shevus. It appears that with these, the rabbis prohibited entire categories of actions so that our shabbos would not feel like a weekday; however the rabbis hung the prohibition on a "lest you violate this Torah prohibition" -- presumably they felt they needed a bit of reinforcement. "Business activity" is prohibited; the reason given was "lest you write", but it seems they used that as an excuse to keep our heads out of the office on shabbos. Similarly, "medical treatment for minor nuisances"; the reason given is "lest you grind herbs", but Rambam rules it even applies to certain forms of massage that are medicalized. Again presumably, if it's something really small, shabbos is a good day for us to let go and let G-d, so to speak. It's even been suggested that the category of "musical instruments" -- "lest you fix them" -- was an excuse for "outside the Temple, you shouldn't be that over-the-top happy."

Occasionally it was clear that "don't do X because of Y, but in rare cases where Y doesn't apply you may do X." Here clearly the only reason was Y, and hence we can expand the loophole to say "today Y almost never applies." For instance, the Gemara discusses a prohibition on bathing out of mourning, then says Rabbi So-and-so bathed anyhow because he was extremely sensitive (istenis). It's reasonable to argue that today we've all become so accustomed to regular bathing that a lot of us fall in the istenis category.

If the specific Talmudic rabbinic prohibition was on X because of Y, then X may be prohibited regardless of Y; however, in similar cases the Talmud did not discuss, we use common sense to determine if Y applies.

The Talmud says clearly a woman has to wait three months between one marriage and the next (so if she becomes visibly pregnant soon after the second marriage, we'll have no doubts on paternity); the three-month-wait rule in this case is generally considered an absolute. However, over the centuries, a newly-converted woman was expected to wait three months before getting married, so we know if the baby was conceived Jewish. As this was not explicitly covered by Talmudic ban, however, twentieth-century halachic authorities (including Rabbi Melech Schachter zt"l, father of the contemporary Rabbi Herschel shlit'a) said we can use common sense and simply have her take a pregnancy test.

Similarly, among various Talmudic bans intended to set up proper fences from the non-Jewish population, was one that said "don't buy mystery milk from a non-Jew." If you walk up to a random farmer in the middle of Libya and he hands you a bucket of milk, that milk is rabbinically prohibited -- even if you then send it to a lab and prove that it's 100% cow/sheep/goat/giraffe/you-get-the-idea milk. Because this is the exact case that the rabbis prohibited. However if you go to a random farmer in Libya and buy butter or powdered milk (according to R' Tzvi Pesach Frank and others), those products weren't under the original ban. Thus if you chemically ascertain the ingredients are kosher, you're all set. (Or in contemporary applications, if your definition of "mystery milk" is "anything milked without a Jew observing", many rabbis will still allow you to buy powdered milk where the combination of regulation and economics makes it obvious the ingredients are kosher.)

Most medical practices in the Talmud are determined to be tied to the science they experienced then and there; today we work with mainstream medicine as we know it. The prohibition on fish-with-meat seems to be the odd exception, which leaves the Magen Avraham scratching his head -- I thought he's saying "but eh whatever keep it anyway", but Rabbi Herschel Schachter shtlit'a reads the Magen Avraham as saying "it's permissible." (Someone pressed him on this -- "so would you eat it in your house?" "My wife would throw me out of the kitchen!" "Okay suppose you were a guest at my house and I was serving it, would you eat it?" "Well ... I should ...) Others have suggested that if the medical practice was explicitly tied to some medical reason, then we can say "apply our science instead"; fish-and-meat was always rather hazy as to why, so it stuck.

If the rabbinic enactment told people to not do that which was a mitzva, it must be limited in scope to its reasoning. (Megillah/lulav/shofar/etc. on shabbos is a different subject.)

The Torah allows one to wear a four-cornered linen garment with techelet-dyed-wool strings, and doing so would be a mitzva. However according to many interpretations, the rabbis banned linen four-cornered-garments because there are too many ways for something to go wrong and suddenly you'd be violating the prohibition of shaatnez. Yet when Rabbeinu Asher moved from Germany (cold climate) to Spain (warm climate) around the year 1300, he found Spanish Jews wearing linen garments with linen strings. They explained that the ban was tied to the existence of techelet-dyed-wool, which was no longer around and hence the ban was lifted. He approved of the logic.

Generally it's a mitzvah to print Jewish books. Yet printing was such a risky and expensive endeavor that if someone else came out with a similar item the next day for a few rubles less, I could be ruined -- left to the free market, printing seforim would not have happened because the risks were too high. Thus the rabbinic leadership would enact a public policy: "Baum & Sons [I'm picking a random name] are printing a Talmud; we will prohibit anyone else from doing so for the next three years, to give them the opportunity to get back into the black." Such a case happened in the 1800s and as it turned out it was a wild success; they were very, very healthily and solidly in the black by the end of year one. It was ruled that this don't-do-a-mitzva enactment had to be limited in scope to its reason, and thus the market was opened to competitors at that point.

The basic rule is where we can interpret the original enactment as having allowed for its expiration due to shifting realities, then we say it expires. In the case of gilui, Rabbi Moshe Feinstein says we interpret the enactment not as one that prohibits exposed liquids; rather, it obligates one to refrain from endangering oneself with possibly tainted drink, even if the possibility is remote. Therefore in areas where the possibility doesn't exist, no enactment was ever in force.