The reference path played a very important role in the parking schemes. In this paper, an arc tangent liked polynomial trajectory model is proposed, and an optimal trajectory is obtained for automatic parallel parking based on genetic algorithm, which ensures that the vehicle does not collide with obstacles or other vehicles during parking. The proposed algorithm has strong robustness because of that all the parameters of the vehicle and the parallel parking spaces are parameterized. Using the trajectory model with the vehicle and parking space parameters, a cost function with multi-constraints, were established for path planning. The start and end points of the planning trajectory are the actual starting point and the desired final parking point of the vehicle by choosing three parameters of the trajectory model appropriately. Simulation results illustrate the effectiveness of the proposed algorithm.