There is growing interest in the quantification of gait as part of complex motor tasks. This requires gait events (GEs) to be detected under conditions different from straight walking. This study aimed to propose and validate a new marker-based GE detection method, which is also suitable for curvilinear walking and step negotiation. The method was first tested against existing algorithms using data from healthy young adults (YA, n = 20) and then assessed in data from 10 individuals from the following five cohorts: older adults, chronic obstructive pulmonary disease, multiple sclerosis, Parkinson’s disease, and proximal femur fracture. The propagation of the errors associated with GE detection on the calculation of stride length, duration, speed, and stance/swing durations was investigated. All participants performed a variety of motor tasks including curvilinear walking and step negotiation, while reference GEs were identified using a validated methodology exploiting pressure insole signals. Sensitivity, positive predictive values (PPV), F1-score, bias, precision, and accuracy were calculated. Absolute agreement [intraclass correlation coefficient (ICC2,1)] between marker-based and pressure insole stride parameters was also tested. In the YA cohort, the proposed method outperformed the existing ones, with sensitivity, PPV, and F1 scores ≥ 99% for both GEs and conditions, with a virtually null bias (<10 ms). Overall, temporal inaccuracies minimally impacted stride duration, length, and speed (median absolute errors ≤1%). Similar algorithm performances were obtained for all the other five cohorts in GE detection and propagation to the stride parameters, where an excellent absolute agreement with the pressure insoles was also found (ICC2,1=0.817− 0.999). In conclusion, the proposed method accurately detects GE from marker data under different walking conditions and for a variety of gait impairments.