Astrophysics is the branch of physics that generally deals with cosmology, stellar evolution and dynamics, black holes, etc.
Theoretical physics is more of a designation for the physicsts who primarily work with mathematical models, simulations and the construction of (obviously) theories. The other designation being experimental physics, which refers to those who investigate the world around us through measurement.
Most people working in astrophysics are primarily theorists. The complimentary branch to their work is often astronomy, although I have heard people use the term "experimental astrophysics" in reference to, for example, cosmic ray detectors.
Other branches of physics also have theorists: condensed matter, sub-atomic, even medical physics to an extent.
Lots of work can often fit under more than one label. It's best not to get too hung up on them - at least until you need to figure out which journal to submit your work to.