Natural products, synthesized via enzymes encoded by biosynthetic gene clusters (BGCs), represent a major source of therapeutic agents. Accurate BGC annotation is essential to unlocking the vast potential of natural product diversity. However, BGC annotation remains challenging due to our incomplete understanding of the enzymatic logic underlying biosynthesis. Here, we present two deep learning models trained on experimentally validated BGC-natural product pairs to advance BGC annotation. The BGC-multihead attention classifier (BGC-MAC) classifies BGCs by natural product class, outperforming antiSMASH and DeepBGC. The BGC-multihead attention product-matcher (BGC-MAP) associates BGCs with product structures, demonstrating potential to prioritize candidate BGCs given a natural product or to identify potential natural products from a given BGC. Importantly, the models' cross-attention mechanisms enable explainable AI, identifying key protein domains and revealing BGC-substructure relationships in the biosynthesis without requiring prior annotations. Together, BGC-MAC and BGC-MAP establish a data-driven, explainable AI framework that enhances BGC annotation, deepens biosynthetic insight, and accelerates the discovery of new natural products. The software is available at https://github.com/EvoCatalysis/BGC_annotation.