Larry Bartels provides some interesting data on that question in his recent book Unequal Democracy (2008, Russell Sage). He shows that the repeal of the estate tax -- a move widely derided by economists, liberals, and others as overwhelmingly benefiting the wealthy -- was, in fact, consistent with public opinion. As far back as we can discern, the public has consistently opposed the estate tax. Republicans sought for years (indeed, throughout the entire 1920s) to repeal it, but those moves were stymied by Democrats through their control of congressional committees, their use of the filibuster, and the threat of presidential vetoes. Only when Republicans controlled the House, Senate, and White House in the mid-2000s were they able to push the repeal through.
Similarly, increases in the minimum wage have basically always held the support of large majorities of the public, yet they rarely pass, and the minimum wage is now worth considerably less in real dollars than it was in the early 1970s. Republicans used the levers of power, even those available to the minority party, to stop or slow down minimum wage increases despite their popularity.
Bartels also notes that the Earned Income Tax Credit, which provides assistance for the working poor, was created and has thrived for decades even though the public, to the extent it understands it, holds only tepid support for it.
In these cases, elected officials pursued what they believe to be good public policy while largely ignoring public opinion. Notably, at least in the case of the estate tax, public opinion seems deeply misguided -- voters opposed the tax either believing that it affected them (it only affected the top 2% of earners) or that they might someday be wealthy enough to be affected by it (there is very little social mobility in the U.S.). Regardless, for years politicians stood to benefit by giving the public what it wanted, but chose not to.
These examples remind me of the West Wing episode ("Lame Duck Congress," Season 2) in which the president pushed for, but the Senate failed to pass, a nuclear test ban treaty, despite its backing by 82% of the American people. As Bartlet later rationalized,
This is one of those situations where I couldn't give a damn what the people think. The complexities of a global arms treaty, the technological, the military, the diplomatic nuances, it's staggering.... 82% of the people cannot possibly be expected to reach an informed decision.Obviously, a democratic republic should be biased toward following public opinion, but there are legitimate cases for ignoring it. The trick is figuring out when.