Nouns ending in -eau are usually masculine.
Is gâteau masculine or feminine?
legâteau
The rule behind it
93.1% of -eau nouns are masculine
In context
Finir le travail pour mardi sera du gâteau.
Finishing the job by Tuesday will be a piece of cake.
Il m'a appris à faire un gâteau.
He showed me how to make a cake.
Attendez que le gâteau refroidisse avant de servir.
Let the cake cool down before serving.