後継者 is a more general term for 'successor' in any field (business, politics, arts), whereas 跡取り is specifically about family lineage and household succession.
Etymology
Compound of 跡 (ato, 'trace' or 'remains') and 取り (tori, 'taking'), literally 'taking over the remains'. The term originally referred to the person who takes over the family estate or business.