Industrial cyber-physical systems (ICPSs) play an important role in many critical infrastructures. To ensure the secure and reliable operation of ICPSs, this work presents a novel end-to-end physics-informed gated recurrent graph attention unit network (PGRGAT) for unsupervised anomaly detection. Different from existing data-driven methods, PGRGAT combines prior knowledge with process data to improve the modeling performance and interpretability. Firstly, a physics-informed graph structure learning module is designed to explicitly model the dependencies among variables into a directed graph. This module learns the Bernoulli distribution on graph edges and generates a discrete graph using Gumbel-softmax sampling. Moreover, prior knowledge is introduced as graph regularization which constrains the graph to adhere to the underlying physics. Then, based on the learned graph structure, a novel gated recurrent graph attention unit network is proposed to simultaneously encode the inter-variable structural dependencies and intra-variable temporal dependencies for anomaly detection. By this means, the information of irrelevant variables can be discarded to improve the sensitivity to anomalies. Finally, the effectiveness of the proposed method is verified through two real-world industrial cases.