Process measurements collected from daily industrial plant operations are essential for process monitoring, control and optimization. However, those measurements are generally corrupted by errors, which include gross errors and random errors. Conventionally, those two types of errors were addressed separately by gross error detection and data reconciliation.This work focuses on solving the simultaneous gross error detection and data reconciliation problem using the hierarchical Bayesian inference technique. The proposed approach solves the following problems in a unified framework. First, it detects which measurements contain gross errors. Second, the magnitudes of the gross errors are estimated. Third, the covariance matrix of the random errors is estimated. Finally, data reconciliation is performed using the maximum a posteriori estimation. The proposed algorithm is applicable to both linear and nonlinear systems. For nonlinear case, the algorithm does not involve any linearization or approximation steps. Numerical case studies are provided to demonstrate the effectiveness of the proposed method.