The fish were poisoned by something in the new water. It could be chlorine/ chloramine (as mentioned by Jaylach) or something else. But any time the fish act unusually or breath heavily straight after a water change, indicates a problem with the new water.
Add a full dose of dechlorinater asap. Use enough to treat the entire tank.
Increase aeration/ surface turbulence to maximise the oxygen level in the water and to help drive out any remaining chlorine.
You need to contact your water supply company (by phone or website) and find out if they add chlorine or chloramine to the water. They are treated slightly differently in aquariums. You can also ask them if they have done any work in the area in the last few days. When they do work on the pipes, they add a lot of chlorine/ chloramine to the water to make sure everything is dead. They don't have to tell you they are doing work or increasing the chlorine/ chloramine levels, and this can happen anytime if there's a burst pipe or something else that has happened to the water supply.
Carbon filters can remove chlorine and chloramine if the carbon isn't full. Chloramine is a combination of chlorine and ammonia, and it stays active for a lot longer (months) than chlorine, which comes out of water in a few days. The problem with carbon filters is they can fill up quickly and one day they stop removing chemicals from the water. Then you do a water change and poison the fish because the carbon is spent (full) and no longer capable of removing anything from the water. Carbon filters should be replaced monthly or you should test the water for chlorine or chloramine after it has gone through the filter.