I'm a complete newbie fan to the LOTR's, watched the movies when I was younger and hated them but just recently watched them again and fell in love with the whole heroic adventure and amazing story! Now I've been busy studying and getting way deeper into the plot and story.
Anyways, I saw this question and wanted to answer. I'm a christian, and reading on Tolkien's (and Lewis) past helps too but here are some examples you might take into mind. IMO Gandalf IS WIDELY portrayed as a protagonist resembling Christ.
1) As someone stated above, as with Christ, he willing sacrificed himself for Frodo and his friends in the mines and chose death to save them.
"No one takes it from me, but I lay it down of my own accord. I have authority to lay it down and authority to take it up again...[And] Greater love has no one than this, that one lay down his life for his friends." John 10:18 John 15:13
2) I saw this in a similar question regarding Gandalf, his humanity and angelic nature. After returning from "death" as Gandalf the White, although being in flesh, he states he has forgotten much about his old (fleshly/mortal) existence and remembered much about his forgotten higher "angelic or spiritual" existence... Christ did the same. Though Gandalf was not of human nature, he willingly chose to take on human form and all of its negatives such as aging, fleshly weakness, emotional strain, etc. much as Christ did; I would encourage you to read Hebrews chpt 2 in full before commenting!
Though being of divine nature"Since the children have flesh and blood, he too shared in their humanity so that by his death he might destroy him who holds the power of death—that is, the devil— and free those who all their lives were held in slavery by their fear of death." For this reason he had to be made like his brothers in every way, in order that he might become a merciful and faithful high priest in service to God, and that he might make atonement for the sins of the people. Because he himself suffered when he was tempted, he is able to help those who are being tempted. This says that Christ willing chose to become like man, in order to live with them and ultimately be able understand and emphasize with men and their struggles because he let go of his ultimately divine nature to take a lesser one that he would be able to understand and have compassion on man and their mortal struggles.
Also, Gandalf endured a great battle with the powerful demon in the mine, a ginormous struggle that pushed him and tested his body and strength, physically, spiritually and psychologically. In the end, after a grueling battle, Gandalf was shown to be victorious and ultimately was exalted by Eru by given greater power and a higher position of authority (hence being given the white robes as leader to the wizards). This is much the same as Christ how at the end of his trials and victory through the cross was "exalted by God". Like the battle with the Balrog and the physical trials Gandalf faced, this portrays the struggle of Jesus on earth, as he was subjected to the flesh and temptations of the devil/demons (see 40 day fast and tempting in the desert) and ultimately at Gethsemane on the Cross when he triumphed over Satan and his demons through death (and ultimately his resurrection). Thus when he returns to heaven, God the Father approves of Christ and the trial and suffering he endured to perfect Him and now glorifies Christ and exalts Him higher than ever before.
"In bringing many sons to glory, it was fitting that God, for whom and through whom everything exists, should make the author of their salvation (Jesus) perfect through suffering."Heb2
....we see him who for a little while was made lower than the angels, namely Jesus, crowned with glory and honor because of the suffering of death, so that by the grace of God he might taste death for everyone.
Thus Jesus is exalted for his sufferings on earth and his heroic valor to save and redeem man. He was not invincible while on earth to succumb to the flesh or pains of mortality; much the same and Gandalf though being of heavenly nature was not removed from the emotional and physical pain of being on earth and in an earthly vessel. Christ and Gandalf were of heavenly origin yet were made, "lower than the angels". In doing so Gandalf relates to man, yet his true nature is not of human nature rather spiritual and heavenly.
And finally THE BIGGEST representation of Gandalf's Christ-like portrayal in the film was his saving entrance at The Battle For Helms Deep. In it, the vast enemy's army, numbering in the thousands, assembles and gathers around the last city and stronghold of those for standing for good and light. just as the enemy surrounds the city and about to overtake it, Gandalf, clothed in shining garments of white, appears above in the sky from the East. As the sun rises, the light shines down from the East onto the west, visible and blinding to the enemies to the West.
Then, as if coming down from the sky (heaven) Gandalf and his army (angels) descend from the sky in robes of white and destroy the evil armies to the west with their swords. Here is the bible narrative that backs this account. You'll see the resemblance, just go watch the scene again and how Gandalf is seemingly descending in a blaze of light from the almost heavenly mountain top-position to descend and conquer the enemy army to the West.
For as the lightning comes out of the East, and shines even unto the West, so it will be when the Son of Man comes. (Matt 24:27)
And then at last, the sign that the Son of Man is coming will appear in the heavens....and they will see the Son of Man coming on the clouds of heaven with power and great glory. 31 And he will send out his angels with the mighty blast of a trumpet, and they will gather his chosen ones from all over the world...
(Rev 11) I saw heaven standing open and there before me was a white horse whose rider is called Faithful and True. With justice he judges and makes war. The armies of heaven were following him, riding on white horses and dressed in fine linen, white and clean.
...Out of his mouth comes a sharp sword with which to strike down the nations.
From here, the devil and his armies see the Son of Man (Gandalf) coming down from the sky and they assemble to make war against the rider on the white horse...
Rev:19 Then I saw the Beast and the kings of the earth and their armies gathered together to make war against the rider on the horse (Jesus or Gandalf) and his army. 20But the beast was captured, and with him the false prophet who had performed the miraculous signs on his behalf. With these signs he had deluded those who had received the mark of the beast and worshiped his image. The two of them were thrown alive into the fiery lake of burning sulfur. 21The rest of them were killed with the sword that came out of the mouth of the rider on the horse, and all the birds gorged themselves on their flesh.
And again, in Revelation 20 when satan is loosed, "and he will go out to deceive the nations in the four corners of the earth—Gog and Magog—to gather them for battle. In number they are like the sand on the seashore (much like the orcs in the innumerable army) 9They marched across the breadth of the earth (like the march from middle earth to Helms deep) and surrounded the camp of God’s people (as Gondor in Battle of the Pelennor Fields), the city he loves. But fire came down from heaven and devoured them." Then the devil who deceived them was thrown into the lake of burning sulfur with the beast and the false prophet, and tormented day and night forever and ever.
As you can see, there are MANY similarities with this, especially in the movie. Please watch the scene where Gandalf descends down from the mountain top on his white horse enveloped in light shining from the rising Sun to make war on the orcs to the West. Though the orcs as numerous as the sand on the seashore are surrounding the great city of Gondor where the last forces of good take their stand, Gandalf and his armies (representing Christ and his angels) arrive descending from the heavens and "strike them down with their sharp sword (Rev 19:15).
I saw various other biblical references, especially in the dominance and rise of man though he yet weaker than the other creatures (he is still mortal, fragile and vulnerable with a short lifespan yet still is given great power and dominion over the earth...see Hebrews 2:6-7).
Thanks guys for any comments, please feel free to correct my mistakes or insert correct names/quotations. As I said, I'm just starting to learn about everything and I don't as much as any of you but wanted to share some things I thought were neat and resemblances i caught to biblical prophesy. Hope I could be at least of some little help! Thanks guys for all the exciting questions and explanations! :)