  We prove a phase transition for the law of large numbers and fluctuations of
$\mathsf F_N$, the maximum of the free energy of the log-gamma directed polymer
with parameter $\theta$, maximized over all possible starting and ending points
in an $N\times N$ square. In particular, we find an explicit critical value
$\theta_c=2\Psi^{-1}(0)>0$ ($\Psi$ is the digamma function) such that:
  1. For $\theta<\theta_c$, $\mathsf F_N+2\Psi(\theta/2)N$ has order $N^{1/3}$
GUE Tracy-Widom fluctuations.
  2. For $\theta=\theta_c$, $\mathsf F_N= \Theta(N^{1/3}(\log N)^{2/3})$.
  3. For $\theta>\theta_c$, $\mathsf F_N=\Theta(\log N)$.
  Using a connection between the log-gamma polymer and a certain random
operator on the honeycomb lattice, recently found by Kotowski and Vir\'ag
(Commun. Math. Phys. 370, 2019), we deduce a similar phase transition for the
asymptotic behavior of the smallest positive eigenvalue of the aforementioned
random operator.
