This paper presents a novel method for tuning a PI controller for a first-order plus time delay (FOPTD) system based on a Multi-gene Genetic Programming (MGGP) and a Particle Swarm Optimization (PSO) algorithm. In our approach, the PSO stablishes a set of optimal gains of the controller for a FOPTD system, based on the plant parameters. Then, the MGGP obtains the mathematical equations to estimate the optimal gains determined by PSO. Finally, to validate the methodology proposed, a group of random systems were selected and tested in MATLAB-SIMULINK, using the calculated equations, focused in its behavior with respect to the maximum overshoot (Mp) and the Integral Square Error (ISE).