A couple days ago, Zak posted about how dumb the tax to enter Castle Greyhawk in a late-edition module was. And yesterday, Peter looked at dungeon taxes more closely, trying to separate good versions of the idea from bad versions of the idea.
I don't think it's out of the question, since in many other cases, there's a tax on treasure or goods when you enter a city. And in the official rules, there's a cost of living charge of 1% on all treasure (Per week? Per month? Still under debate...) which presumably includes taxes, without any associated role-playing. Essentially, that becomes a tax on entering the dungeon that's been postponed until after you leave.
There's a tax or fee to enter Blackmoor dungeons, I think. I was just reading The First Fantasy Campaign and seem to recall that. But that is a dungeon in the middle of a town. I think some kind of official control of entry into a dungeon is not only reasonable, but necessary, if the dungeon is in or extremely close to a settlement. Of course, in some cases, the "control" is a patrol that keeps people away, unless bribed.
I had a plan for a dungeon near Port Skar in the 9 and 30 Kingdoms setting. After the wormpocalypse, one exposed exit point of a great worm allowed access to phenomenal raw gems, which triggered the boom that resulted in the founding of Port Skar. The easy pickings on the upper levels are mostly tapped out, and the lower levels are dangerous, but there's still some traffic, and there are guards in place. I'd certainly set up some kind of legal restriction on lower level access, but I think I'll make an outright tax something the city already tried, provoking outrage. The city's income is now a tax on trade.