Depending on details of the context, you might say this person
has feet of clay.
From Cambridge Advanced Learners Dictionary & Thesaurus:
have feet of clay
to have a bad quality that you keep hidden: Some of the greatest geniuses in history had feet of clay.
Often the "feet of clay" refer to a hidden character flaw, but they can refer
to any other shortcoming that is unexpected.
Compare the definition from Dictionary.com:
feet of clay
noun
a weakness or hidden flaw in the character of a greatly admired or respected person: He was disillusioned to find that even Lincoln had feet of clay.
any unexpected or critical fault.
Note, however, that all these definitions imply that the weakness was
somehow hidden or unexpected. So if it was known from the very beginning
that a person was a virtuoso in all subjects at school but one,
and that he or she was bound to fail in that one subject, "feet of clay"
may not be the most apt expression.
If the idea is that most people think this person a very good student,
and that the poor performance in one subject is somehow surprising or
difficult to reconcile with the student's other abilities,
"feet of clay" might be a suitable description.
One other connotation of the phrase is that this one weakness in the person
will lead to their ultimate downfall in some way (similar to an Achille's heel).
This particular connotation does fit the case of a student who would have
been first in his or her class if not for one subject.
From The Free Dictionary:
feet of clay
A flaw or vulnerability of someone who is otherwise admirable. In the Bible's Book of Daniel, King Nebuchadnezzar dreamed that he saw a statue made of gold, silver, and brass, but with feet of clay. Daniel interpreted the vision to mean that the clay symbolized the Babylonian Empire's vulnerability and imminent collapse. (See Achilles' heel.)