Many people don't "get" democracy. They think that it means that they personally get to decide how the country is run. These are the most disappointed & bitter people you will meet. Others think that democracy is where public opinion sets government policy. If that were the case, you could replace the parliament with a survey company, & it would still be cheaper. I think I've seen frightening Sci-Fi stories like that.
Democracy means that everyone has an equal say in which of several candidates represents them in the parliament - at the time of elections. Nothing more. Parliaments are not there to follow the will of the people. In fact, we have parliaments to make the decisions that the average person could not make & would not make if given the chance - the hard decisions. We often forget this when a new law is unpopular. The media might label a government as courageous if they make that hard choice & implement a policy that makes them unpopular, but that they believe is right in the long run. It takes courage, sometimes, to do what's right. That's why we should elect a particular government in the first place.
We should support governments that can & do make those hard decisions, rather than the weak ones who constantly bow to public opinion over matters that aren't "courageous". Public opinion itself is too often whipped up by a media frenzy when complex issues are over-simplified, or when the uneducated & loud (not mentioning any shock jock in particular) demand that people listen to his (never her) opinion. The alternative way to spur the slow-moving populace into action is by rallying the troops - whether that means unions, students, interest groups or communities. Painting a picture over an issue in a particular manner is a great way to garner support for your opinion. That doesn't make it worthy of the support of everyone else. It doesn't make it right.
It is the role of the government to take advice from experts - usually the public service, but often committees of specialists - & act accordingly for the good of the nation. By all means, they should keep an eye on the polls to see just how far from public sentiment the hard decisions are - & act accordingly by leading the public & educating them as to why the decision was right. For a government to simply turn turtle as soon as their popularity slides is worse than cowardice - it's turning their back on the responsibility given to them when they were elected by the democracy.