Acts of Peter and Andrew
The Christian apocryphal text takes up the saying about the eye of the needle and actually has Peter perform a miracle in which a camel passes back and forth through the eye of a needle in front of a pagan opponent:
13 There was a rich man named Onesiphorus who said: If I believe, shall I be able to do wonders? Andrew said: Yes, if you forsake your wife and all your possessions. He was angry and put his garment about Andrew's neck and began to beat him, saying: You are a wizard, why should I do so? 14 Peter saw it and told him to leave off. He said: I see you are wiser than he. What do you say? Peter said: I tell you this: it is easier for a camel to go through a needle's eye than for a rich man to enter the kingdom of God. Onesiphorus was yet more angry and took his garment off Andrew's neck and cast it on Peter's and haled him along, saying: You are worse than the other. If you show me this sign, I and the whole city will believe but if not you shall be punished. 15 Peter was troubled and stood and prayed: Lord, help us at this hour, for thou hast entrapped us by thy words. 16 The Saviour appeared in the form of a boy of twelve years, wearing a linen garment 'smooth within and without', and said; Fear not: let the needle and the camel be brought. There was a huckster in the town who had been converted by Philip; and he heard of it, and looked for a needle with a large eye, but Peter said: Nothing is impossible with God rather bring a needle with a small eye. 17 When it was brought, Peter saw a camel coming and stuck the needle in the ground and cried: In the name of Jesus Christ crucified under Pontius Pilate I command thee, camel, to go through the eye of the needle. The eye opened like a gate and the camel passed through; and yet again, at Peter's bidding. 18 Onesiphorus said: You are a great sorcerer: but I shall not believe unless I may send for a needle and a camel. And he said secretly to a servant: Bring a camel and a needle, and find a defiled woman and some swine's flesh and bring them too. And Peter heard it in the spirit and said: O slow to believe, bring your camel and woman and needle and flesh. 19 When they were brought Peter stuck the needle in the ground, with the flesh, the woman was on the camel. He commanded it as before, and the camel went through, and back again. 20 Onesiphorus cried out, convinced and said: Listen. I have lands and vinevards and 27 litrae of gold and 50 of silver, and many slaves: I will give my goods to the poor and free my slaves if I may do a wonders like you. Peter said: If you believe, you shall. 21 Yet he was afraid he might not be able, because he was not baptized, but a voice came: Let him do what he will. So Onesiphorus stood before the needle and camel and commanded it to go through and it went as far as the neck and stopped. And he asked why. 'Because you are not yet baptized.' He was content, and the apostles went to his house, and 1,000 souls were baptized that night. 22 Next day the woman that was hung in the air said: Alas that I am not worthy to believe like the rest! I will give all my goods to the poor and my house for a monastery of virgins. Peter heard it and went out to her and at his word she was let down unhurt, and gave him for the poor 4 litrae of gold and much raiment and her house for a monastery of virgins. 23 And the apostles consecrated a church and ordained clergy and committed the people to God.
SOURCE: Comparative Religion web site
Samuel Lachs Rabbinic Commentary, (331f) mentions the following partial parallels:
It is easier for a camel to go through the eye of a needle, etc. This is an obvious folksaying to illustrate a nearly impossible task or something extraordinary. In the Talmud we find a similar expression, "an elephant passing through a needle's eye" [B. Ber. 55b, B. BM 38b], referring to an impossible dream or over-subtle dialectics.
See also Abrahams, Studies II, p. 208, where he cites a contrasting passage from a difficult text, PR 15(70a), "The Holy One said: Open for Me a door as big as a needle's eye and I will open for you a door through which you may enter tents and (?)." Cf. also Cant. R. 5.2. One suggestion is that it may be kirka'ot of Isa, 66.20, where the meaning is probably "dromedaries." "If this be so the parallel, or rather contrast is striking. The repentant sinner opens a needle's eye to God, and God opens a gate in which tents and camels might camp. The figure almost seems employed as a foil to the Gospel passage quoted." Others have explained that in Syriac/Aram., "camel" could be a misreading of "rope."
The following example of the saying is found in the Quran, and in this case the item that cannot pass through the eye of a needle is a rope rather than a camel:
To those who reject Our signs and treat them with arrogance, no opening will there be of the gates of heaven, nor will they enter the garden, until the rope can pass through the eye of the needle: Such is Our reward for those in sin. (Al-A'raf 7:40)