It's not made explicit precisely why Father James feels he must go through with the fatal meeting at the end of the movie, which has been anticipated since the first scene in the confessional.
Peter Keough in Boston Globe suggests:
Gleeson’s priest offers himself up as a sacrifice to redeem the sins of his fellow clergy, and of just about everyone else in town.
Throughout the film James absorbs the anger and hatred of the people around him - some of which is partly justified by the moral failure of the church. There is a sense that by confronting his attacker and offering himself defenseless, the fury of the people against the priesthood will somehow be spent and the people will be able to move on to a better relationship with the priesthood and with God.
Robert Barron proposes that Father James' actions follow from a Roman Catholic understanding of the priesthood:
It seems to be the grimmest possible ending, a confirmation of the worldview of the most nihilist and despairing of Fr. James’s parishioners. But then we remember that the movie is entitled “Calvary” and that a good priest, by definition, is an alter Christus, another Christ. Jesus’ shepherding ministry came to its climax on a squalid hill outside of Jerusalem, when he stood his ground as the darkness and dysfunction of the world swept over him. The crucified Jesus did not battle evil on its own terms, but rather swallowed it up in the divine mercy: “Father, forgive them, for they know not what they do.” Fr. James, though tempted to avoid his awful confrontation with wickedness, walked all the way up his own Calvary, and dealt with sin precisely as Jesus had.
The final scene of the film is filled with Christian hope. Fr. James’s daughter comes to the prison where her father’s killer is incarcerated. Through the glass partition that separates them, he looks at her with anguish, but she looks back at him with a smile. Though no words are exchanged, it is clear that Fr. James’s heroic witness to the most underrated of virtues has had its effect. Through the ministrations of a real priest, a green shoot appears in a spiritual wasteland; Calvary is followed by resurrection.
In suffering at the hands of wicked people, even to death, Father James echoes the biblical image of the Suffering Servant. Though Christians understand that Christ's sacrifice for us was once-for-all, there is still a sense in Christian theology that somehow we participate in this in an ongoing way. In the words of the apostle Paul:
I am now rejoicing in my sufferings for your sake, and in my flesh I am completing what is lacking in Christ’s afflictions for the sake of his body, that is, the church.
Though Father James' death does not effect a salvation for the town, his actions paint a powerful picture of the sufferings of Christ, through whom salvation is offered. It may be said that he is somehow participating in Christ's ongoing work in the world through his actions and blameless death.