Skeptics have certainly attempted to negate the prophetic aspects of this psalm, which was composed approximately 1,000 years before the life of Christ, but the reality of its foretelling cannot be ascribed to sheer coincidence.
Certainly parts of Psalm 22 may have had a preliminary application to events in the life of David himself, but many of its details – such as the dividing of the individual's clothes and the casting lots for them, and the piercing of his hands and feet – obviously did not.
In the same way, it is clear that the crucifixion of Jesus was witnessed by a great many individuals, and it is unrealistic in the extreme to suggest that the early Christians simply said that all the details mentioned in Psalm 22 occurred at the death of Jesus when so many could have contradicted them if that were not the case.
Here are just some of the statements found in Psalm 22 alongside their parallels in the Gospel accounts of Jesus' crucifixion. A number of other correspondences can be seen by reading the psalm in its entirety, but consider the following selected examples:
Psalm 22:1 My God, my God, why have you forsaken me?
Matthew 27:46 About the ninth hour Jesus cried…“My God, My God, Why have you forsaken me?”
Psalm 22:7 All who see me mock me;
Matthew 27:41 In the same way the chief priests, the teachers of the law and the elders mocked him
Psalm 22:7 they hurl insults, shaking their heads.
Matthew 27:39 Those who passed by hurled insults at him, shaking their heads
Psalm 22:8 “He trusts in the Lord,” they say, “let the Lord rescue him. Let him deliver him …”
Matthew 27:43 He trusts in God. Let God rescue him now if he wants him …
Psalm 22:14 I am poured out like water,
John 19:34 ... pierced Jesus’ side with a spear, bringing a sudden flow of blood and water.
Psalm 22:15 My mouth is dried up like a potsherd, and my tongue sticks to the roof of my mouth;
John 19:28 Later… so that Scripture would be fulfilled, Jesus said, "I am thirsty"...
Psalm 22:16 … they pierce my hands and my feet.
John 19:23a … the soldiers crucified Jesus
Psalm 22:18 They divide my clothes among them and cast lots for my garment…
John 19:23-24a When the soldiers crucified Jesus, they took his clothes, dividing them into four shares, one for each of them, with the undergarment remaining … “Let’s not tear it,” they said, “Let’s decide by lot who gets it.”
Psalm 22 does not end with the death of the one it describes, however. The psalm continues by speaking of a time beyond the death of that clearly messianic individual:
All the ends of the earth
will remember and turn to the Lord,
and all the families of the nations
will bow down before him,
for dominion belongs to the Lord
and he rules over the nations.
All the rich of the earth will feast and worship;
all who go down to the dust will kneel before him –
those who cannot keep themselves alive.
Posterity will serve him;
future generations will be told about the Lord.
They will proclaim his righteousness,
declaring to a people yet unborn:
He has done it! (Psalm 22:27-31).
Notice especially the closing words of the psalm: “He has done it!” These words, referring to the future culmination of the purposes of God beyond the suffering and death of the promised Messiah, were also closely echoed in the final words of Jesus on the cross: “It is finished!” (John 19:30) – words of victory marking not the end, but the beginning.