  In 1966, Gallai asked whether all longest paths in a connected graph have a
nonempty intersection. The answer to this question is not true in general and
various counterexamples have been found. However, there is a positive solution
to Gallai's question for many well-known classes of graphs such as split
graphs, series parallel graphs, and $2K_2$-free graphs. Among all the graph
classes that support Gallai's question, almost all of them were shown to be
Hamiltonian under certain conditions. This observation motivates us to
investigate Gallai's question in graphs that are "close" to Hamiltonicity
properties. Let $\{R,S\}$ be a pair of connected graphs. In particular, in this
paper, we show that Gallai's question is affirmative for all connected
$\{R,S\}$-free graphs such that every 2-connected $\{R,S\}$-free graph is
Hamiltonian. These pairs $\{R,S\}$ were completely characterized in 1990s.
