"Is any among you sick? Let him call for the presbyters of the Church, and let them pray over him, anointing him with oil in the name of the Lord; and the prayer of faith will save the sick man, and the Lord will raise him up; and if he has committed sins, he will be forgiven." (Jas 5:14-15)
The sacrament of Anointing of the Sick has as its purpose the conferral of a special grace on the Christian experiencing the difficulties inherent in the condition of grave illness or old age. 1
Illness can lead to anguish, self-absorption, sometimes even despair and revolt against God. It can also make a person more mature, helping him discern in his life what is not essential so that he can turn toward that which is. Very often illness provokes a search for God and a return to him. 2
1 Part 2, Chapter 2, Article 5, Catechism of the Catholic Church-Second Edition
2 Part 2, Chapter 2, Article 5, Catechism of the Catholic Church-Second Edition