DNA methylation means adding one or more methyl groups to the DNA, so technically it is an alteration. But most people would assume that altering a gene specifically means changing the "letters" of the gene sequence that encode the protein, and that's not what DNA methylation does.