We present the first measurement at the LHC of exclusive J/ψ photoproduction off protons, in ultraperipheral proton-lead collisions at sqrt[s_{NN}]=5.02 TeV. Events are selected with a dimuon pair produced either in the rapidity interval, in the laboratory frame, 2.5<y<4 (p-Pb) or -3.6<y<-2.6 (Pb-p), and no other particles observed in the ALICE acceptance. The measured cross sections σ(γ+p→J/ψ+p) are 33.2±2.2(stat)±3.2(syst)±0.7(theor) nb in p-Pb and 284±36(stat)_{-32}^{+27}(syst)±26(theor) nb in Pb-p collisions. We measure this process up to about 700 GeV in the γp center of mass, which is a factor of two larger than the highest energy studied at HERA. The data are consistent with a power law dependence of the J/ψ photoproduction cross section in γp energies from about 20 to 700 GeV, or equivalently, from Bjorken x scaling variable between ∼2×10^{-2} and ∼2×10^{-5}, thus indicating no significant change in the gluon density behavior of the proton between HERA and LHC energies.