Taking the second possibility first, the argument for internal development goes something like this. Jesus began a practice of sharing meals among his followers without the usual regard for status. These meals had no sacrificial overtones and didn't make use of the body/blood symbolism. His followers continued these shared meals after Jesus's death, and they began picking up symbolic imagery. The bread became a symbol of the community of believers, spread out on the earth but gathered together in Jesus's name, as in the Didache. For Paul, the community of believers form the body of Christ, so we get bread = community = body of Christ. The wine, in the Didache tradition, became a symbol of the Vine of David, but in Paul's tradition it became a symbol of Christ's death. Here is Paul's Eucharistic tradition (1 Corinthians 10:16-17):
The cup of blessing that we bless, is it not a participation in the blood of Christ? The bread that we break, is it not a participation in the body of Christ? Because there is one bread, we who are many are one body, for we all partake of the one bread.
Paul does not talk of drinking the blood of Christ, but of participating in it: the blood of Christ here is not the wine, but Christ's death on the cross. That was the sacrifice that allowed believers to be reunited with God. And the cup (wine is not mentioned) has become the symbol of Christ's death, as the bread has become a symbol of the resurrected Jesus, alive in the community of believers.
From there it was a short step - presumably taken in a Gentile, not a Jewish, context - to talking of drinking the blood and eating the body of Christ. Eventually, it was all re-worked into a "historical" event, the Last Supper, providing a myth of origin for the ritual.
But this scenario leaves a lot of questions unanswered. Why was that short step taken that introduced the eating of Jesus's flesh and blood? And how did some Jews (the author of the gospel of Matthew, for example) come to accept it?
What of the possibility of borrowing of a pagan tradition? The difficulty here is that it is very hard to pin down the exact form of various pagan traditions. The mystery cults, of course, kept their rituals secret: that was the whole point of the cult. The penalty for revealing the cult secrets was death.With no written texts, the rituals undoubtedly varied widely in both space and time, complicating the issue even more.
The most promising parallel is the cult of Dionysus, the god of wine. In early times (c. 400 BC), there was a ritual called omophagion, the eating of raw meat. This may or may not have been symbolic of eating the god himself: the evidence is unclear, and scholars are divided. Several writers mention wine as the blood of Bacchos/Dionysus, and drinking wine as "drinking the god." Euripides refers to the common Greek custom of pouring a libation of wine as an offering before drinking by saying:
Dionysus, himself a god, is poured out in offering to the gods....Compare this with Mark's version of the Last Supper (Mark 14:20):
And he said to them, “This is my blood of the covenant, which is poured out for many."The Dionysian initiation was intended to make the initiate god-like. Gold plates from tombs have been found with the inscription:
Welcome, you who have suffered such suffering as you suffered before; From man you have become a god; kid, you fell into milk.
But in 186 BC, the Dionysian celebrations got so out of hand that the Roman senate cracked down severely on the cult. By the time of Jesus, the cult had been reborn as a mystery religion - how much it resembled the older cult is unknown. It certainly retained a widespread popularity in Jesus's time: Marc Antony had himself declared the New Dionysus when he came to Ephesus in 41 BC. And the walls of a villa in Pompeii depict scenes from the cult ritual.
Special meals were important in most pagan cults. The worshipers of Sarapis held regular feasts at which Sarapis himself was the host, and sometimes even issued the invitations. The second-century Christian writer Justin notes a close connection between the meals of the Mithras cult and those of Christian Eucharist:
... Jesus took bread, and when He had given thanks, said, "This do ye in remembrance of Me, this is My body;" and that, after the same manner, having taken the cup and given thanks, He said, "This is My blood;" and gave it to them alone. Which the wicked devils have imitated in the mysteries of Mithras, commanding the same thing to be done. For, that bread and a cup of water are placed with certain incantations in the mystic rites of one who is being initiated, you either know or can learn.(1st Apology, 66)
Just how close the two rituals are is hard to tell. Justin may be exaggerating the similarity in order to support his demonic imitation explanation, and he is, of course, not allowed to reveal the secrets of the mystery cult. (Note, though, that he clearly knows the secrets himself, and assumes that the emperor, to whom he is writing, knows them or can find out easily enough.)
These pagan parallels are certainly suggestive, but they leave unanswered the questions of who, when, and why. Who introduced pagan elements into the Christian shared meal? When and where did this occur? (It must have been early; Mark, the earliest gospel, already has a fairly developed form of the Last Supper.) Why did they do so, and why did even Jewish Christians accept the change?
The Dionysian ritual depicted in the Pompeii frescoes shows a libation, music and dance, a girl offering her breast to a kid, and flagellation by a winged, female figure. So the Christian Eucharist could hardly be a wholesale adoption of the Dionysian ritual. For Mithraism, we have only Justin's ambiguous statement about the meal tradition. The other elements of the cult - a rigid hierarchy of grades with a series of initiations into each grade, and a central myth of Mithras slaying a bull - do not seem to have been part of Christianity in its early stages. Likewise for the other mystery cults of which we have some knowledge: a wholesale adoption of some pagan ritual just doesn't seem to work as an explanation.
There is, as far as I can see, no really satisfactory explanation for the origin of the Christian Eucharist. Certainly we can agree with H.-J. Klauck that "without hellenistic influence, the sacramental conception of the Lord's Supper in early Christianity would not have come about." There is absolutely no precedent in Jewish literature for eating the flesh and drinking the blood of a man or a god. Whereas in Greek religion the language of "drinking the god" is certainly there, even if we can't identify a specific ritual that closely resembles the Eucharist. But when and how and why this language crept into Christian ritual, and thence into dogma, remains mysterious.