Post-stroke patients present various gait abnormalities such as drop foot, stiff-knee gait (SKG), and knee hyperextension. Functional electrical stimulation (FES) improves drop foot gait although the mechanistic basis for this effect is not well understood. To answer this question, we evaluated the gait of a post-stroke patient walking with and without FES by inverse dynamics analysis and compared the results to an optimal control framework. The effect of FES and cause-effect relationship of changes in knee and ankle muscle strength were investigated; personalized muscle-tendon parameters allowed the prediction of pathologic gait. We also predicted healthy gait patterns at different speeds to simulate the subject walking without impairment. The passive moment of the knee played an important role in the estimation of muscle force with knee hyperextension, which was decreased during FES and knee extensor strengthening. Weakening the knee extensors and strengthening the flexors improved SKG. During FES, weak ankle plantarflexors and strong ankle dorsiflexors resulted in increased ankle dorsiflexion, which reduced drop foot. FES also improved gait speed and reduced circumduction. These findings provide insight into compensatory strategies adopted by post-stroke patients that can guide the design of individualized rehabilitation and treatment programs.