  Inclusive $\psi$(2S) production is measured in p-Pb collisions at the
centre-of-mass energy per nucleon-nucleon pair $\sqrt{s_{\rm{NN}}}=8.16$ TeV,
using the ALICE detector at the CERN LHC. The production of $\psi$(2S) is
studied at forward ($2.03 < y_{\rm cms} < 3.53$) and backward ($-4.46 < y_{\rm
cms} < -2.96$) centre-of-mass rapidity and for transverse momentum $p_{\rm{T}}$
$<$ 12 GeV/$c$ via the decay to muon pairs. In this paper, we report the
integrated as well as the $y_{\rm cms}$- and $p_{\rm T}$-differential inclusive
production cross sections. Nuclear effects on $\psi$(2S) production are studied
via the determination of the nuclear modification factor that shows a strong
suppression at both forward and backward centre-of-mass rapidities. Comparisons
with corresponding results for inclusive J/$\psi$ show a similar suppression
for the two states at forward rapidity (p-going direction), but a stronger
suppression for $\psi$(2S) at backward rapidity (Pb-going direction). As a
function of $p_{\rm T}$, no clear dependence of the nuclear modification factor
is found. The relative size of nuclear effects on $\psi$(2S) production
compared to J/$\psi$ is also studied via the double ratio of production cross
sections $[\sigma_{\psi(2S)}/\sigma_{\rm{J/}\psi}]_{\rm
pPb}/[\sigma_{\psi(2S)}/\sigma_{\rm{J/}\psi}]_{\rm pp}$ between p-Pb and pp
collisions. The results are compared with theoretical models that include
various effects related to the initial and final state of the collision system
and also with previous measurements at $\sqrt{s_{\rm{NN}}}$ = 5.02 TeV.
