A robust residual-based a posteriori error estimator is proposed for a weak Galerkin finite element method for the Stokes problem in two and three dimensions. The estimator consists of two terms, where the first term characterises the difference between the L2-projection of the velocity approximation on the element interfaces and the corresponding numerical trace, and the second is related to the jump of the velocity approximation between the adjacent elements. We show that the estimator is reliable and efficient through two estimates of global upper and global lower bounds, up to two data oscillation terms caused by the source term and the nonhomogeneous Dirichlet boundary condition. The estimator is also robust in the sense that the constant factors in the upper and lower bounds are independent of the viscosity coefficient. Numerical results are provided to verify the theoretical results.