Fallacy lists usually treat this one carelessly, and the carelessness is harmful. Told that appealing to authority is a fallacy, people conclude that expert consensus can be waved away — which is not scepticism but a licence to believe anything. The real distinction is narrower and far more useful.
Deferring to expertise is not merely acceptable; it is unavoidable. You cannot personally replicate the drug trials behind your medication, verify the structural calculations of the building you are in, or reproduce the climate record. Trusting relevant expert consensus, provisionally and with awareness that it can be wrong, is how a person reasons well under real limits. Refusing to do so does not make you rigorous.
The fallacy occurs in specific, identifiable situations. When the authority is outside their field — a brilliant physicist on nutrition, an actor on vaccines — their standing carries no weight. When the field is genuinely divided, citing one expert conceals that others disagree. When the authority has an undisclosed interest, such as industry funding, their conclusion needs independent corroboration. When the appeal is to vague authority — "scientists say," "experts agree" — with nothing checkable behind it. And when authority is used to close inquiry rather than point toward evidence: the point of citing an expert is that you could go and look at what they looked at.
A useful test is whether the citation is doing evidential work or social work. "The consensus of climate scientists, based on multiple independent lines of evidence, is X" points you toward something examinable. "A very smart person believes X, so stop asking" does the opposite. The first is reasoning; the second is the fallacy.