In order to solve problems in traditional gait detection algorithms, such as simplification of information, low accuracy, being easy to fall into local optimum, a gait detection algorithm for exoskeleton robot called Support Vector Machine optimized by Improved Whale Optimization Algorithm (IWOA-SVM) was proposed. The selection, crossover and mutation of Genetic Algorithm (GA) were introduced to Whale Optimization Algorithm (WOA) to optimize the penalty factor and kernel parameters of Support Vector Machine (SVM), and then classification models were established by SVM with optimized parameters, expanding the search scope and reduce the probability of falling into local optimum. Firstly, the gait data was collected by using hybrid sensing technology. With the combination of plantar pressure sensor, knee joint and hip joint angle sensors, motion data of exoskeleton robot was acquired as the input of gait detection system. Then, the gait phases were divided and tagged according to the threshold method. Finally, the plantar pressure signal was integrated with hip and knee angle signals as input, and gait detection was realized by IWOA-SVM algorithm. Through the simulation experiments of six standard test functions, the results demonstrate that Improved Whale Optimization Algorithm (IWOA) is superior to GA, Particle Swarm Optimization (PSO) algorithm and WOA in robustness, optimization accuracy and convergence speed. By analyzing the gait detection results of different wearers, the accuracy is up to 98.8%, so the feasibility and practicability of the proposed algorithm in the new generation exoskeleton robot are verified. Compared with Support Vector Machine optimized by Genetic Algorithm (GA-SVM), Support Vector Machine optimized by Particle Swarm Optimization (PSO-SVM) and Support Vector Machine optimized by Whale Optimization Algorithm (WOA-SVM), the proposed algorithm has the gait detection accuracy improved by 5.33%, 2.70% and 1.44% respectively. The experimental results show that the proposed algorithm can effectively detect the gait of exoskeleton robot and realize the precise control and stable walking of exoskeleton robot.