It is an adaptation of a short story by Philip K. Dick published in 1956.
However, the story itself is not a remake of anything else; it is an original work by Dick.