Question: is the head gasket part of the motor

Answer: Yes, A head gasket is a gasket that sits between the engine block and cylinder head(s) in an internal combustion engine.