Modern software security is challenged by vulnerabilities, which canlead to severe consequences, including loss of information, property, andprivacy disclosure. Recently, graph-based deep learning methods havebeen proven as a promising solution for vulnerability detection at func-tional granularity. However, previous studies still face challenges, suchas structural imbalances, complex connections in abstract syntax treesof functions, and insufficient training data. In this study, we proposeGuard2Vul, which combines a graph neural network with a residualnetwork to jointly capture deeper semantic and structural features,specifically, source code and node dependencies. Moreover, we utilizeGraphSMOTE and DGD, a dropout-enhanced gradient adversarial train-ing technique, to conduct data augmentation and automatically improvenormalized stability. To demonstrate the effectiveness of Guard2Vul, we evaluate its performance on four experimental subjects by different pro-gramming languages, such as C/C++ and Java. To show the competitive-ness of Guard2Vul, we consider five Deep Learning-based vulnerabilitydetection approaches (i.e., TokenCNN, Sysevr, VulDeePecker, Devign,and Reveal) as baselines. The results indicate that Guard2Vul out-performs these baselines, achieving at least 13.4%, 28.9%, 6.2%, and12.1% higher F1-measure on four experimental subjects. Finally, weperform ablation experiments to demonstrate the effectiveness of ourcustomized components, namely enhanced graph representation learningand the gradient-based adversarial training method, in Guard2Vul.