(a) Solids (Iron) expand on heating and contract on cooling. This causes the volume to matter of increase during heating or expansion, the mass of matter does not change.
(b) During heating the distance between the particles of the iron latch change. In an iron latch the distance between the iron particles increases when they gain enough heat. So during hot days the latch on the gate was difficult to open. At night, because of cooling the distance between the particles decreases. So at night it was not difficult to open the latch on the gate.