Abstract Background Melatonin can regulate plant growth, development and biotic responses by causing global changes in gene expression; however, the melatonin-induced changes in gene expression via the modification of DNA methylation remain unclear in plants. Results A total of 1,169,852 and 1,008,894 methylated cytosines (mCs) were identified in the control and melatonin-treated grape berries, respectively, and mCs occurred primarily at CG sites, followed by CHG sites and CHH sites. Compared to the control, melatonin treatment broadly decreased methylation levels at CHG and particularly CHH sites in various gene regions. Melatonin treatment generated a total of 25,125 differentially methylated regions (DMRs), which included 6517 DMR-associated genes. RNA-Seq demonstrated that 2479 genes were upregulated, and 1072 genes were repressed by melatonin treatment. The evaluation of the interconnection of the DNA methylome and transcriptome identified 144 genes showing a negative correlation between promoter methylation and gene expression, which were primarily related to biotic stress responses and flavonoid biosynthesis. Additionally, the application of 5́-azacytidine and melatonin led to similar effects on mycelial growth of B. cinerea, berry decay rate and flavonoid biosynthesis. Moreover, EDS1 was used to show that melatonin increased gene expression by decreasing promoter methylation levels. Conclusion Our results demonstrated that melatonin broadly decreased DNA methylation and altered gene expression in grape berries. We propose that melatonin increases disease resistance and flavonoid biosynthesis by decreasing the methylation levels of the promoters of the genes involved.