It is described in Plato's Republic, the last six paragraphs. Here's part of the opening:
Well, I said, I will tell you a tale; not one of the tales which Odysseus tells to the hero Alcinous, yet this too is a tale of a hero, Er the son of Armenius, a Pamphylian by birth. He was slain in battle, and ten days afterwards, when the bodies of the dead were taken up already in a state of corruption, his body was found unaffected by decay, and carried away home to be buried. And on the twelfth day, as he was lying on the funeral pile, he returned to life and told them what he had seen in the other world.
He said that when his soul left the body he went on a journey with a great company, and that they came to a mysterious place at which there were two openings in the earth; they were near together, and over against them were two other openings in the heaven above. In the intermediate space there were judges seated, who commanded the just, after they had given judgment on them and had bound their sentences in front of them, to ascend by the heavenly way on the right hand; and in like manner the unjust were bidden by them to descend by the lower way on the left hand; these also bore the symbols of their deeds, but fastened on their backs. He drew near, and they told him that he was to be the messenger who would carry the report of the other world to men, and they bade him hear and see all that was to be heard and seen in that place.
Then he beheld and saw on one side the souls departing at either opening of heaven and earthwhen sentence had been given on them; and at the two other openings other souls, some ascending out of the earth dusty and worn with travel, some descending out of heaven clean and bright. And arriving ever and anon they seemed to have come from a long journey, and they went forth with gladness into the meadow...