Yours is an important question in mathematics education, and especially in mathematics teacher preparation. Subject area content knowledge (as mentioned in the question) is of some importance, as well as generalized pedagogical knowledge (reflecting the general knowledge about what it means to be a good teacher.
However, Shulman (1986) identified other forms of knowledge important to teaching. For example, Pedagogical Content Knowledge:
A second kind of content
knowledge is pedagogical knowledge, which goes beyond knowledge
of subject matter per se to the dimension of subject matter
knowledge for teaching. I still speak of content knowledge
here, but of the particular form of content knowledge that
embodies the aspects of content most germane to its
teachability. (p. 9)
Knowledge of representation is an important form of PCK. For example, a mathematician may not need to know the sorts of visual models that help a 4th grader grasp aspects of ratio and proportion as a part of their learning fractions (as opposed to teaching them to manipulate fractions).
Within the category of pedagogical content knowledge I
include, for the most regularly taught topics in one's subject
area, the most useful forms of representation of those ideas,
the most powerful analogies, illustrations, examples,
explanations, and demonstrations—in a word, the ways of
representing and formulating the subject that make it
comprehensible to others. (p. 9)
This is not just knowledge of students. There is legitimate mathematical content knowledge that is more important for teaching than it is for doing mathematics. For instance, few mathematicians have a reason to distinguish between quotative and partitive division. Yet they are distinct mathematical conceptions of division that also happen to make it easier to understand how young students see division.
This page goes into some detail on the difference between these conceptions, including a video example of work with a student.
Shulman also discussed "Curricular Knowledge" which specifically refers to instructional materials (and would be of little interest to experts in the subject area).
Other researchers focusing on teacher knowledge have broken the categories down further. Hill, Ball, and Schilling (2008) proposed an overall domain map known now as "MKT" (Mathematical Knowledge for Teaching). There is some evidence linking forms of knowledge described in this model to classroom practice (Shechtman, Roschelle, Haertel, & Knudsen, 2010). It breaks down into many, very specific, categories that researchers continue to investigate (Common Content Knowledge, Specialized Content Knowledge, Knowledge at the Mathematical Horizon, Knowledge of Content and Students, Knowledge of Content and Teaching, and Knowledge of Curriculum).
Even more recently, Schoenfeld has asked questions about how teachers make decisions (2010) and how we should observe the quality of a particular mathematics classroom based on what we see going on there (2013). The latter has resulted in a theoretical model of classroom quality involving multiple dimensions that are related to what he sees as going into educational decision-making (teacher knowledge, teacher orientations, routines, etc.). Not surprisingly, the classroom itself is quite a bit more complex than what goes into teacher decision making.
In any case mathematical content knowledge is distinct from what makes a good math teacher. Others in their responses here have covered the idea that expertise sometimes makes it harder to actually bridge a communication gap in understanding (referred to by @adamblan as a blind spot). The differences go well beyond that, and even beyond knowledge of students and teaching. Some of the references here should help you delve into how researchers investigate (and have theorized about) the differences alluded to in your question.
Hill, H. C., Ball, D. L., & Schilling, S. G. (2008). Unpacking pedagogical content knowledge: Conceptualizing and measuring teachers’ topic-specific knowledge of students. Journal for Research in Mathematics Education, 39(4), 372–400.
Schoenfeld, A. H. (2010). How We Think: A Theory of Goal-Oriented Decision Making and Its Educational Applications. Studies in Mathematical Thinking and Learning Series. ERIC.
Schoenfeld, A. H. (2013). Classroom observations in theory and practice. ZDM, 45(4), 607–621.
Shechtman, N., Roschelle, J., Haertel, G., & Knudsen, J. (2010). Investigating links from teacher knowledge, to classroom practice, to student learning in the instructional system of the middle-school mathematics classroom. Cognition and Instruction, 28(3), 317–359.
Shulman, L. S. (1986). Those who understand: Knowledge growth in teaching. Educational Researcher, 15(2), 4.