discernment of spirits
A judgment whereby to discern whether an impulse in the soul comes from the good spirit (God or angel), or from the evil one; a free gift of God and infallibly certain, when resting on a special supernatural illumination; an act of prudence, more or less perfect, when based on reflection and experience.
In well disposed souls the action of the good spirit is recognized by the effect of tranquillity and a consistent tendency toward good, that of the evil one by disturbance, and a more or less hidden tendency towards evil.
An opposite course is adopted by both spirits towards sinners.
New Catholic Dictionary