Abstract We prove several abstract versions of the Łojasiewicz–Simon gradient inequality for an analytic function on a Banach space that generalize previous abstract versions of this inequality, weakening their hypotheses and, in particular, that of the well-known infinite-dimensional version of the gradient inequality due to Łojasiewicz [S. Łojasiewicz, Ensembles semi-analytiques, (1965), Publ. Inst. Hautes Etudes Sci., Bures-sur-Yvette. LaTeX version by M. Coste, August 29, 2006 based on mimeographed course notes by S. Łojasiewicz, https://perso.univ-rennes1.fr/michel.coste/Lojasiewicz.pdf] and proved by Simon [L. Simon, Asymptotics for a class of nonlinear evolution equations, with applications to geometric problems, Ann. of Math. (2) 118 1983, 3, 525–571]. We prove that the optimal exponent of the Łojasiewicz–Simon gradient inequality is obtained when the function is Morse–Bott, improving on similar results due to Chill [R. Chill, On the Łojasiewicz–Simon gradient inequality, J. Funct. Anal. 201 2003, 2, 572–601], [R. Chill, The Łojasiewicz–Simon gradient inequality in Hilbert spaces, Proceedings of the 5th European-Maghrebian workshop on semigroup theory, evolution equations, and applications 2006, 25–36], Haraux and Jendoubi [A. Haraux and M. A. Jendoubi, On the convergence of global and bounded solutions of some evolution equations, J. Evol. Equ. 7 2007, 3, 449–470], and Simon [L. Simon, Theorems on regularity and singularity of energy minimizing maps, Lect. Math. ETH Zürich, Birkhäuser, Basel 1996]. In [P. M. N. Feehan and M. Maridakis, Łojasiewicz–Simon gradient inequalities for harmonic maps, preprint 2019, https://arxiv.org/abs/1903.01953], we apply our abstract gradient inequalities to prove Łojasiewicz–Simon gradient inequalities for the harmonic map energy function using Sobolev spaces which impose minimal regularity requirements on maps between closed, Riemannian manifolds. Those inequalities generalize those of Kwon [H. Kwon, Asymptotic convergence of harmonic map heat flow, ProQuest LLC, Ann Arbor 2002; Ph.D. thesis, Stanford University, 2002], Liu and Yang [Q. Liu and Y. Yang, Rigidity of the harmonic map heat flow from the sphere to compact Kähler manifolds, Ark. Mat. 48 2010, 1, 121–130], Simon [L. Simon, Asymptotics for a class of nonlinear evolution equations, with applications to geometric problems, Ann. of Math. (2) 118 1983, 3, 525–571], [L. Simon, Isolated singularities of extrema of geometric variational problems, Harmonic mappings and minimal immersions (Montecatini 1984), Lecture Notes in Math. 1161, Springer, Berlin 1985, 206–277], and Topping [P. M. Topping, Rigidity in the harmonic map heat flow, J. Differential Geom. 45 1997, 3, 593–610]. In [P. M. N. Feehan and M. Maridakis, Łojasiewicz–Simon gradient inequalities for coupled Yang–Mills energy functions, preprint 2019, https://arxiv.org/abs/1510.03815v6; to appear in Mem. Amer. Math. Soc.], we prove Łojasiewicz–Simon gradient inequalities for coupled Yang–Mills energy functions using Sobolev spaces which impose minimal regularity requirements on pairs of connections and sections. Those inequalities generalize that of the pure Yang–Mills energy function due to the first author [P. M. N. Feehan, Global existence and convergence of solutions to gradient systems and applications to Yang–Mills gradient flow, preprint 2016, https://arxiv.org/abs/1409.1525v4] for base manifolds of arbitrary dimension and due to Råde [J. Råde, On the Yang–Mills heat equation in two and three dimensions, J. reine angew. Math. 431 1992, 123–163] for dimensions two and three.