This is often called the "Gateway to Heaven" puzzle, and is written in terms of an angel (truthteller) and a demon (liar) guarding the doors to Heaven and Hell. The demon is so deceptive that he and his door appear identical to the angel and his door.
Hint: Since you cannot be sure who you are talking to, somehow you need to create a question that involves both parties.
Solution (mouseover to read):
Ask either person "What path would the other person say is the wrong one?"
If you are speaking to the truthteller, then he will answer faithfully on behalf of the liar. The liar would indicate the correct path (since you asked for the wrong one), and the truthteller will faithfully relay that to you.
If you are speaking to the liar, then he will lie on behalf of the truthteller. That is, the truthteller would correctly tell you which path is wrong, but the liar will then reverse this and indicate the correct path to you.
Thus, no matter who you are speaking to, the path they give as the answer will be the correct path.