In this paper, we develop a data-driven approach for the safety verification of stochastic systems with unknown dynamics. First, we use a notion of barrier certificates in order to cast the safety verification as a robust convex program (RCP). Solving this optimization program is difficult because the model of the stochastic system, which is unknown, appears in one of the constraints. Therefore, we construct a scenario convex program (SCP) by collecting a number of samples from trajectories of the system. Then, we develop a repetition-based scenario framework to provide an out-of-sample performance guarantee for the constructed SCP. In particular, we iteratively solve an SCP for a given number of samples, and then check its feasibility using a certain number of new samples after substituting the optimal decision variables from solving the SCP. We continue the iterations until a desired violation error is achieved. Eventually, a safety condition is checked on top of the feasibility problem. If the safety condition is fulfilled, then we can provide a lower bound on the probability of safety satisfaction for the original stochastic system by leveraging the optimal solution of the successful iteration. We illustrate the effectiveness of the proposed results through a two-tank system case study, where the safety objective is to ensure that the water levels in both tanks are within some safe zones.