Anointing of the Sick is the sacrament in which grace is given to help overcome the difficulties of sickness or old age. Anointing of the Sick:
"By the sacred anointing of the sick and the prayer of the priests the whole Church commends those who are ill to the suffering and glorified Lord, that he may raise them up and save them. And indeed she exhorts them to contribute to the good of the People of God by freely united themselves to the Passion and death of Christ."
-Catechism of the Catholic Church (CCC) 1499
All Catholics who face some danger of death from sickness or old age are able to receive the Sacrament of Anointing of the Sick. There is no need to wait till the moment of death to receive the sacrament, and it is actually preferable to be proactive in receiving the sacrament earlier while still able to participate in the celebration of the sacrament. It is also advisable to receive the sacrament prior to major surgery.
The Catechism of the Catholic Church states:
"The Anointing of the Sick 'is not a sacrament for those only who are at the point of death. Hence, as soon as anyone of the faithful begins to be in danger of death from sickness or old age, the fitting time for him to receive this sacrament has certainly already arrived.'
If a sick person who received this anointing recovers his health, he can in the case of another grave illness receive this sacrament again. If during the same illness the person's condition becomes more serious, the sacrament may be repeated. It is fitting to receive the Anointing of the Sick just prior to a serious operation. the same holds for the elderly whose frailty becomes more pronounced.-Catechism of the Catholic Church (CCC) 1514-1515