Barnacles are confounding. First of all they are part of Pancrustacea the group that includes crabs. They are also arthropods like ants.
They are more closely related to ants and crabs than snails or other Mollusca.
You'd think they'd have evolved from mussels, right? Nope.
Then there is their life cycle, which is similar to many creatures that have a plankton stage, but it's still odd and makes them hard to study.
Darwin nearly died trying really understand barnacles.