Ex opere operato is a Latin phrase meaning "from the work done" referring to the efficacy of the Sacraments deriving from the action of the Sacrament as opposed to the merits or holiness of the priest or minister.
According to the teaching of the Catholic Church, to receive the fruits of the sacraments requires that a person be properly disposed. This means reception of grace via the sacraments is not automatic. There must be, at least in the case of an adult, an openness to receive the grace which is available in a sacrament. When the recipient is properly disposed, the grace of the sacrament is effective and is received even if the priest or minister is in a serious state of sin. This principle gives a certainty to the availability of grace through the sacraments.
This principle holds that the effect of the sacrament is a result, not of the holiness of a priest or minister, but rather of Christ Himself who is the Author (directly or indirectly) of each sacrament. The priest or minister acts "in persona Christi" (in the person of Christ) even if in a serious state of sin. Although such a sacrament would be valid, and the grace effective, it is nonetheless sinful for any priest to celebrate a sacrament while himself in a state of sin.
The principle of ex opere operato affirms that while a proper disposition (openness) is necessary to receive grace in the sacraments, it is not the cause of the grace. Catholics believe that what God offers in the sacraments, is a gift, freely bestowed out of God’s own love. A person's disposition, as good as it may be, does not automatically bring God's blessing.
In the Anglican tradition, the principle of "ex opere operato" is made conditional upon worthy reception. Article XXVI of the Thirty-nine Articles (Of the unworthiness of ministers which hinders not the effect of the Sacrament) states that the ministration of the Word (Scripture) and sacraments is not done in the name of the priest or minister and that the effect of Christ's sacraments is not taken away, nor God’s grace diminished by the sinfulness of clergy. This is because sacraments have their effect due to Christ’s promise to His Church.
The principle regarding sacramentals is that they operate ex opere operantis Ecclesiae (i.e. from the working of the Church) as well as "ex opere operantis" (i.e. from the action of the doer). With regard to sacramentals, it is the teaching of the Catholic Church that their efficacy is derived from the prayer and good deeds of the Church as well as the disposition of the one making use of the sacramental. Sacramentals dispose the soul to receive grace and may remit venial sins when used prayerfully.