We have studied the transverse-momentum (p(T)) dependence of the inclusive J/psi production in p-Pb collisions at root s(NN) = 5.02 TeV, in three center-of-mass rapidity (y(cms)) regions, down to zero p(T). Results in the forward and backward rapidity ranges (2.03 < y(cms) < 3.53 and -4.46 < y(cms) < -2.96) are obtained by studying the J/psi decay to mu(+)mu(-), while the mid-rapidity region (-1.37 < y(cms) < 0.43) is investigated by measuring the e(+)e(-) decay channel. The p(T) dependence of the J/psi production cross section and nuclear modification factor are presented for each of the rapidity intervals, as well as the J/psi mean p(T) values. Forward and mid-rapidity results show a suppression of the J/psi yield, with respect to pp collisions, which decreases with increasing p(T). At backward rapidity no significant J/psi suppression is observed. Theoretical models including a combination of cold nuclear matter effects such as shadowing and partonic energy loss, are in fair agreement with the data, except at forward rapidity and low transverse momentum. The implications of the p-Pb results for the evaluation of cold nuclear matter effects on J/psi production in Pb-Pb collisions are also discussed.