If the gasket failed at some point then it could overheat the engine. Could be the cause, as well as the result. Gaskets fail for multiple reasons, examples: head not bolted correctly, wrong or faulty gaskets, incorrect coolants or even oils, years of use.