A quantum BP neural networks model with learning algorithm is proposed. First, based on the universality of single qubit rotation gate and two-qubit controlled-NOT gate, a quantum neuron model is constructed, which is composed of input, phase rotation, aggregation, reversal rotation and output. In this model, the input is described by qubits, and the output is given by the probability of the state in which |1 is observed. The phase rotation and the reversal rotation are performed by the universal quantum gates. Secondly, the quantum BP neural networks model is constructed, in which the output layer and the hide layer are quantum neurons. With the application of the gradient descent algorithm, a learning algorithm of the model is proposed, and the continuity of the model is proved. It is shown that this model and algorithm are superior to the conventional BP networks in three aspects: convergence speed, convergence rate and robustness, by two application examples of pattern recognition and function approximation.