Bistable biochemical switches are widely found in gene regulatory networks and signal transduction pathways. Their switching dynamics are difficult to study, however, because switching events are rare, and the systems are out of equilibrium. We present a simulation method for predicting the rate and mechanism of the flipping of these switches. We apply it to a genetic switch and find that it is highly efficient. The path ensembles for the forward and reverse processes do not coincide. The method is widely applicable to rare events and nonequilibrium processes.