Asphaltene precipitation is a major problem in the oil production and transportation of oil. Changes in pressure, temperature, and composition of oil can lead to asphaltene precipitation. In the case of gas injection into oil reservoirs, the injected gas causes a change in oil composition and may lead to asphaltene precipitation. Accurate determination and prediction of the precipitated amount are vital, for this purpose there are several approaches such as experimental method, scaling equation, thermodynamics models, and neural network as the most recent ones. In this paper, we propose a new artificial neural network (ANN) optimized by particle swarm optimization (PSO) to predict the amount of asphaltene precipitation. This is conducted during the process of gas injection into oil reservoirs for enhanced oil recovery purposes. In the developed models, (1) oil composition, (2) temperature, (3) pressure, (4) oil specific gravity, (5) solvent mole percent, (6) solvent molecular weight, and (7) asphaltene content are considered as input parameters to the neural network. The weight of asphaltene and asphaltene content are considered as input parameters to the neural network and the weight of asphaltene precipitation as an output parameter. A comparison between the results of the proposed new model with Gaussian Process algorithm and previous research shows that the predictive model is more accurate.