The circumference denoted by c(G) of a graph G is the length of its longest cycle. Let I^´(G) and I¨(G) denote the minimum degree and the clique number of a graph G, respectively. In [\emph{Electron. J. Combin.} 31(4)(2024) #P4.65], Yuan proved that if G is a 2-connected graph of order n, then c(G)≥min{n,I¨(G)+I^´(G)} unless G is one of two specific graphs. In this paper, we prove a stability result for the theorem of Erd\H os and Gallai, thereby helping us to characterize all 2-connected non-hamiltonian graphs whose circumference equals the sum of their clique number and minimum degree. Combining this with Yuan's result, one can deduce that if G is a 2-connected graph of order n, then c(G)≥min{n,I¨(G)+I^´(G)+1}, unless G belongs to certain specified graph classes.