My best guess is that even had a viable CIWS been developed during WW2, the battleship as a type would have been dead, simply because of the way that the Pacific War played out and let the aircraft carrier gain ascendancy over the "gun club." Remember, the US Navy's experiments with surface-to-air missiles began in 1944, and were
not, as many believe, a response to the kamikaze, but rather to the Fritz-X; the goal was to be able to shoot down bombers carrying guided weapons before they could get close enough (~15-20 miles) to release them. As soon as the missile was semi-functional (the "3-T" systems were disastrously bad when first fielded and didn't get reliable until McNamara spent a fortune on a "get-well" program for them in the 60s that actually required killing development of their original successor), missile advocates, along with the aviation types, declared the gun to be obsolete, resulting in a number of US ships being commissioned with no real guns at all. (For example,
Long Beach and the Leahy-class DLGs were originally built with only a small number of 40mm-and-smaller guns to deal with possible small boat attack; when Kennedy, after witnessing the disastrous 3-T demonstration in 1961, ordered that all missile ships be equipped with at least two effective guns as a backup,
Long Beach had to have a pair of single 5"/38s grafted onto her, while the Leahys, with no space for such a weapon, ended up having some of the 3"/50RF guns dug up out of mothballs and bolted on in place of their 40mms.)
(Yes, there were people who objected to this. For example, the Marines, who wanted to know how in hell an all-missile ship could support an amphibious landing; there were also people who wondered what would happen if an all-missile ship
not attached to a carrier group were to run into any sort of surface opponent equipped with... well, pretty much any anti-ship weapon, since budget limitations resulted in the Navy cancelling its development of anti-ship missiles in the late 40s and not resuming it until starting work on Harpoon in the late 60s. The response to both of these arguments was, "Oh, that's not a problem, we can just fire Nuclear Terrier at surface targets!" Unanswered was the question of what the hell they'd do in a less-than-nuclear conflict...)
Now, had Pearl gone differently, allowing the battleships to be used more in the early parts of the war and thus show that they still had viable uses, it's plausible that the battleship, as a type, wouldn't have been essentially dead after WW2. Indeed, it's likely that
Hawaii and
Kentucky (and possibly
Illinois) would have been completed to their missile ship designs, and that the rest of the Alaskas and Iowas would have remained in active service for the remainder of their design lives (i.e., up until 1970-1975ish) without any extended mothballings; while the "Big Five" would have probably been disposed of as in OTL (1958-60), the North Carolinas and SoDaks probably would have been retained in reserve longer. However, I don't see any real chance of any new construction of capital or semicapital ships being likely; the USN already had enough such ships and, when the Alaskas and Iowas came to the end of their service lives, if it was felt that "heavy escorts" were still necessary for the carriers, the NCs and SDs would be sitting there in mothballs, able to be resurrected. (While less than ideal for carrier heavy escorts, they would have been vastly cheaper to revive than new construction, and in the tight budgetary climate of the post-Vietnam era, that is a major consideration.) The only design I see being plausibly built as replacements in the heavy escort role would be the "
Strike Cruiser" of the 1970s that very nearly got built IOTL; it would have been a viable "heavy escort" for carriers in that it was to be armored to a similar degree to WW2 cruisers and thus could absorb some punishment while remaining combat-effective. (Irony: OTL, the justification for the CSGN was that modern warships were not suitable for operations
detached from carrier groups, as they didn't have ballistic protection sufficient to allow them to viably operate without air support. In this timeline, the CSGN's justification would be to
protect carrier groups from such things as the remaining Sverdlov-class light cruisers!)
(I have, in the past, done some work towards trying to figure out an alternate history that would have battleship development and construction continue through the end of the 20th Century. The only real viable option I came up with to justify it was using some
very handwavy excuses to claim that failures in early experiments with arming airplanes were
so disastrous that the very concept of armed airplanes became toxic and "non-career enhancing" for young officers--that's right, I basically could only justify the battleship remaining a going concern in the world's navies past 1945 by
eliminating armed airplanes entirely.)