More and more stroke survivors are suffering from physical motor impairments. Current therapeutic interventions have various limits to the efficient recovery of normal motor function of the lower limbs. Therefore, we propose a novel gait rehabilitation system for hemiplegic patients after stroke. It integrates functional electrical stimulation (FES) with a pelvis-supporting robotic system. A corresponding relationship between the gait phase and the active lateral movement of the pelvis is first constructed from experiments on simulated hemiplegic patients. By estimating the gait phase from the lateral motion of the pelvis based on this relationship, the timing of FES sent to the muscles of the lower limbs can be automatically determined during a gait cycle. After experiments on simulated hemiplegic stroke survivors with the FES control algorithm, the proposed algorithm and the gait rehabilitation system are verified to be feasible and promising.