For most careers, specialists and generalists operate in parallel. The former moves up the knowledge ladder while the latter develops management skills.
Pay wise it is hard to generalize as different jobs have different dynamics, but generally speaking they shouldn't differ too much provided you move up at the same pace. Of course if one is gunning for an organization top job like CEO then generalists securing such a role is more prevalent due to their broad based experience.
Ultimately it's what you are comfortable and competent with that is more important. If you are a technical person and can cope with increasing complexity of the topic at hand and prefer to either work alone or lead small teams, specialist is the way to go. If you like people management, play office politics, plan team budgets and resources, then generalist is better.