Is energy always conserved?

I don't think it is accurate to call this a violation of Conservation of Energy. Ethan Siegel at Stars With A Bang wrote a piece on medium last year attempting to address the exact same question (Where does the energy of photons red shifted by the cosmic expansion go?"), and his conclusion was that, at best, this MIGHT present a violation of CoE in some future quantum theory of gravity; but given our present understanding of physics, it is completely consistent with Conservation of Energy:

"[...] as the Universe expands, photons lose energy. But that doesn’t mean energy isn’t conserved; it means that the energy goes into the Universe’s expansion itself, in the form of work. And if the Universe ever reverses the expansion and contracts again, that work will be done in reverse, and will go right back into the photons inside. It is possible that in a fuller (i.e., quantum) theory of gravity, a stricter definition of energy will emerge, and we’ll be able to truly see whether it is or isn’t conserved. But in the absence of a strict definition, all we can do is use what we have to work with, and those are the tools and definitions we already have. Yes, photons lose energy, but that energy doesn’t disappear forever; the amount of energy loss (or gain, for that matter) adds up to exactly what it should in the expanding (or contracting) Universe."

Source: https://medium.com/starts-with-a-bang/ask-ethan-when-a-photon-gets-redshifted-where-does-the-energy-go-9b97d9b49d5c#.z2cmabo73