I am possessed! Yes, with the thinking that if there is actually a Maxwell's Demon, then it would open the negligible weighted door which would ultimately make the second law invalid. But really can second law be invalid? This is not my question. It is a universal law. So, what should be the logic that the Demon would fail?? Please don't say that work must be done to open the door. The door is so light that negligible work is done.
The resolution to Maxwell's demon paradox is mostly understood to be through Landauer's principle, and it is one of the most compelling applications of information science to physics. Landauer's principle asserts that erasing information from a physical system will always require performing work, and particularly will require at least $$k_B T \ln(2)$$
of energy to be spent and eventually released as heat. The concept of 'erasing information' is relatively tricky, but there are some pretty solid foundations to think that this principle is right.
To apply it to the demon, you should realize that the demon consists of (at least) two parts: a sensor to detect when particles are coming, and an actuator to actually move the door. For the demon to work correctly, the actuator must act on the current instruction from the sensor, instead of the previous one, so it must forget instructions as soon as a new one comes in. This takes some work: there is some physical system encoding a bit and it will take some energy cost to flip it.
Now, there are some criticisms of Landauer's principle, and it is not completely clear whether it is dependent on the Second Law of Thermodynamics or if it can be proved independently; for an example see this paper (doi). Nevertheless, even if it is a restatement of the Second Law, it carries considerable explanatory power, in that it clarifies how the Second Law forbids the demon from operating.
Four additions to other answers and your questions:
I agree with your thoughts about the door. In principle, it can be arbitrarily near to lossless.
The work cost does not arise in knowing when to open the door, i.e. in measuring the state of gas particles. This was actually what Leo Szilard thought, as he discussed in 1929 in L Szilard, "Über die entropieverminderung in einem thermodynamischen system bei eingriffen intelligenter wesen (on the reduction of entropy in a thermodynamic system by the intervention of intelligent beings)", Zeitschrift für Physik 53 (1929), pp840-856.
A few words explaining Emilio Pisanty's Answer further. Landauer's principle can be thought of as coming ultimately from the reversibility of physical systems. We can replace the Daemon with a simple three-state finite state machine and indeed this has been done in the laboratory, see Shoichi Toyabe; Takahiro Sagawa; Masahito Ueda; Eiro Muneyuki; Masaki Sano, "Information heat engine: converting information to energy by feedback control", Nature Physics 6 (2010), no. 12, pp988-992.. By conceiving of the Maxwell Daemon in this way as an extremely simple, mechanistic state machine, we elegantly tell Szilard's Intelligenter Wesen to hit the road Jack and banish once and for all any talk of "intelligence" and "consciousness" from these discussions. Information in real systems, such as the state of this finite state machine, must be encoded as physical states of the system. Now, if the computer memory is erased, or overwritten, this must mean that the bit it encoded has to wind up encoded instead in the states of the now subtly changed matter of the Maxwell Daemon - the computer - if we accept the reversibility of the laws of physics at the microscopic level: a simulation could compute any former state of a physical system from a full specification of any later or earlier state. Physical systems have a finite information storage capacity - one of only ways wherein their information soaking capacity can be increased is by heating them (think of a quantum oscillator - as you heat it, it can access higher and higher states and thus can encode more information). So, as the Daemon "forgot" more and more bits, its matter would need to become more and more thermalised to yield more storage space for the "forgotten" information. Either the Daemon would stop working, or we would need to do work to expel the excess entropy. We can summarise this process: the information content of the gas has been decreased by the action of the Daemon and door; this information has effectively "flowed" from the gas, to the computer's internal states, then to the computer's surrounding matter. I say more about all this in my answer to the question "How can the microstates be measured with zero energy expenditure?" here
I believe James Clerk Maxwell actually conceived of the Daemon to demonstrate the statistical nature of the second law: that it could in principle be violated by an "intelligence". AS we know now, the second law still stands.
One of the best references around on this stuff is Charles Bennett's review paper:
You can also think of this in terms of information only, without invoking thermodynamics right from the start. So, you just have a system, and you don't know the exact physical state it is in. If we then consider that system including all the features needed to operate Maxwell's demon as a totally isolated system, such that even quantum decoherence is inhibited, then it will evolve in time according to unitary time evolution. This means that there is a one to one map from final to initial states, it's not possible for two physically different initial states to evolve to the same final state.
In particular, this means that you cannot have $N$ of such systems each in a different state and end up with these systems being in $M$ possible final states if $M<N$. For Maxwell's demon to be effective thus requires it to compensate for the lower number of available physical states, it can store information in its own memory or dump it elsewhere. In these cases the total number of states remains the same, it's just that part of the system is the gas we're interested in, which ends up in one of a lower number of possible final states.
The only thing that Maxwell's demon can do that would be impossible according to conventional thermodynamics is to let a system evolve to its exact quantum mechanical ground state, i.e. cool it (precisely) to absolute zero. With only conventional thermodynamic means you cannot do this, because to cool something, you either need something cooler to begin with or you must let the system perform work. Obviously, the former case is not going to help when attempting to cool something to precisely absolute zero and in the latter case, entropy stays constant at best.
The reason why thermodyamics can be violated in this case is because in thermodynamics we make the assumption that of the huge number of degrees of freedom of a system, you only have a few external parameters availabe to manipulate the system. Maxwell's demon is obviously not sticking to this rule, however, it cannot escape unitary time evolution and somehow allow for two different initial states to evolve to the same final state.
The problems of the Demon are coming from the randomness. The second law of thermodynamics is just saying, that randomness is spreading through any hole and any obstacles. Just because of it randomness.
If you put very complex lock on the way of randomness, it will found the combination sooner or later. It is just the matter of time.
So, if Demon interacting with outside world, a randomness can find a way into the Demon, into his entrails. Once it will be inside, it will disturb the work of Demon and at the moment, he will be in thermal equilibrium with the environment.
This is the matter of Demon anatomy, how stable he is in the circumstances of constant attacking by randomness.
Randomness can cause molecule to hit Demon's body. Will he withstand it? Won't he make a mistake with his door at the moment of hit? How fine Demon will be after billion of hits?
Randomness can cause Demon to mistake about molecules. What if Demon found a fast molecule and opened the door to pass it, but at next moment a molecule was hit by another molecule and turned slow? Demon will pass wrong molecule. Once Demon will make billion mistakes, won't he become angry and start to work in reverse?
Separating molecules for a long time, closing and open door for hours and hours, won't Demon turn tired? May be he will decide to play tennis at some moment? Won't his brains become mad and random?
You see, that nothing real can fit the job.
But if we have "absolute" Demon, then, of course, he can do the job.
The following are requirements for candidate for Demon's job:
1) he should have weightless and frictionless door
2) he should have some radar, which detects molecule position and speed, but never affect it; particularly, radar rays never emitted by mistake and never push molecules
3) he should withstand any hits of molecules on his body and continue to work
In terms of thermodynamics, such Demon would be just an infinite source of energy. It will provide order to our world and withstand any chaos to penetrate inside him and from inside him.