Genes don’t directly create complex structures in the way you are thinking. Rather these patterns arise via emergent effects of proteins interacting and resisting each other across populations of cells.[1]
So really what you might have is a certain neuronal cell type that sends signaling molecules that cause it to divide in a very particular way that could roughly create a structure similar to a face detecting filter. If cells can grow into bones or coral reefs, why not face detecting neurons?