Despite the global importance of forests, it is virtually unknown how their soil microbial communities adapt at the phylogenetic and functional level to long-term metal pollution. Studying 12 sites located along two distinct gradients of metal pollution in Southern Poland revealed that functional potential and diversity (assessed using GeoChip 4.2) were highly similar across the gradients despite drastically diverging metal contamination levels. Metal pollution level did, however, significantly impact bacterial community structure (as shown by MiSeq Illumina sequencing of 16S rRNA genes), but not bacterial taxon richness and community composition. Metal pollution caused changes in the relative abundance of specific bacterial taxa, including Acidobacteria, Actinobacteria, Bacteroidetes, Chloroflexi, Firmicutes, Planctomycetes and Proteobacteria. Also, a group of metal-resistance genes showed significant correlations with metal concentrations in soil. Our study showed that microbial communities are resilient to metal pollution; despite differences in community structure, no clear impact of metal pollution levels on overall functional diversity was observed. While screens of phylogenetic marker genes, such as 16S rRNA genes, provide only limited insight into resilience mechanisms, analysis of specific functional genes, e.g. involved in metal resistance, appears to be a more promising strategy.