Historically, the meaning of the term “capital ship” has evolved over time. Broadly speaking it refers to the most powerful category of warship in a navy, and in its original usage (dating back to WWI and/or the 1920s) it was a term that encompased both categories of dreadnought-type vessels: battleships and battlecruisers. This was at a time when it was still believed that naval battles would ultimately be decided by slugging matches between fleets of heavily-armoured warships armed with heavy artillery. Battlecruisers went out of fashion after WWI, with just a few more being completed from the 1920s onward. Battleships improved in speed, and by the 1930s and 1940s they had (in a sense) merged with battlecruisers to produce “fast battleships” which combined the speed of battlecruisers with the firepower and protection of battleships. During WWII, the aircraft carrier displaced battleships as the most important pieces on the naval chessboard, and they became regarded as the new “capital ships” of navies. Carriers were themselves (arguably) displaced in the capital-ship role by ballistic missile submarines when they arrived on the scene in the 1950s and 1960s – but the point is arguable because CVNs and SSBNs have very different missions and capabilities, and because the largest CVNs (like the Nimitz class carriers) are huge and enormously expensive vessels, even when compared with big SSBNs.
Uncrustable mentioned that in Global War battleships and carriers are both considered capital ships, and Cmdr Jennifer indicated this also being the case in A&A. This certainly works from a historical perspective, since the former were considered capital ships at the beginning of the war and the latter at its end.