Not to mention that there are other costs associated with other systems. Take the CIWS guns. They're high-speed, automated gatlings. That means a lot of moving parts, whihc means wear and tear on components and regular maintenece needed. While I'm sure there's maintence on a laser system as well, it will have fewer moving parts. A general rule of thumb is fewer moving parts=cheaper maintenence.
Additionally, a CIWS gun is a high-speed gun, meaing even a short burst to intercept a missile is using hundreds of rounds (the US Phalanxx fires 4500 rounds/minute, so even a tenth of a second burst, which is probably about right for a single intercept, is going through 7 or 8 rounds). And it fires 20mm shells, which aren't cheap.
Additionally, gun systems have ammunition limitations: The Phalanx holds 1550 rounds. While one would hole that 230 intercept shots is sufficient, it may not always be. A laser that doesn't require ammunition opens up space in ammo storage areas for other munitions, and doesn't suffer as much from problems of re-supply (easier to get just fuel for the power plant than fuel and ammunition).
Now, does this mean it will be cheaper and more effective in the long run? Well, that's hard to say. Which is why the Navy is testing it out. I can see the advantages to it: higher accuracy for what is effectively an instantaneous line-of-sight weapon (for all practical intent at the ranges considered). Relatively unlimited ammo. Fewer moving parts.
My best guess is that the Navy wil end up moving to a combined system, a mix of traditional intercept missiles, Phalanx guns, and laser systems. Each offers advantages the others lack, and each has disadvantages. This gives ships a flexibility to use the best system for the particular conditions.
ETA: Not to mention I've experienced the land-based version of the Phalanx, the C-RAM. THere are issues of noise and vibration, as well. The things are LOUD. So saving half your crew from ringing ears (immediately) and hearing loss(long-term) isn't to be overlooked, either.