In previous studies we produced autism like behavioral changes in mice by Valproic acid (VPA) with significant differences between genders. S-adenosine methionine (SAM) prevented the autism like behavior in both genders. The expression of 770 genes of pathways involved in neurophysiology and neuropathology was studied in the prefrontal cortex of 60 days old male and female mice using the NanoString nCounter. In females, VPA induced statistically significant changes in the expression of 146 genes; 71 genes were upregulated and 75 downregulated. In males, VPA changed the expression of only 19 genes, 16 were upregulated and 3 downregulated. Eight genes were similarly changed in both genders. When considering only the genes that were changed by at least 50%, VPA changed the expression of 15 genes in females and 3 in males. Only Nts was similarly downregulated in both genders. SAM normalized the expression of most changed genes in both genders. We presume that genes that are involved in autism like behavior in our model were similarly changed in both genders and corrected by SAM. The behavioral and other differences between genders may be related to genes that were differently affected by VPA in males and females and/or differently affected by SAM.