部分 literally means "part" here, which is the definition of the word that you'll find in any dictionary, so I suspect that it's not the meaning (or "function") of 部分 itself that's confusing you.
Rather, you're probably not understanding that 苗字にあたる is a relative clause modifying 部分 (in other words, the phrase 苗字にあたる is describing what kind of 部分 it is) and everything before など is listing up examples of that 苗字にあたる部分.
Does that help you puzzle it out at all?