Around the first or second season, JJ Abrams told the ending to Stephen King. King reportedly loved it (and once threatened to divulge it if they stretched the show beyond five seasons, like Abrams had told him). Why Stephen King of all people?
Stephen King's Dark Tower novels involve parallel dimensions. People who are about to die can see into the other dimension (like Juliet, Charlie and Desmond). At some point they have to get someone who is dead from the other dimension, but his presence in the "main" one starts fucking up reality.
The similarities may be a coincidence, but I don't think so.