We report on the measurement of the $gamma p rightarrow J/psi p$ cross section from $E_gamma = 11.8$ GeV down to the threshold at $8.2$ GeV using a tagged photon beam with the GlueX experiment. We find the total cross section falls toward the threshold less steeply than expected from two-gluon exchange models. The differential cross section $dsigma /dt$ has an exponential slope of $1.67 pm 0.39$ GeV$^{-2}$ at $10.7$ GeV average energy. The LHCb pentaquark candidates $P_c^+$ can be produced in the $s$-channel of this reaction. We see no evidence for them and set model-dependent upper limits on their branching fractions $mathcal{B}(P_c^+ rightarrow J/psi p)$ and cross sections $sigma(gamma p to P_c^+)timesmathcal{B}(P_c^+ to J/psi p) $.