To enhance the stability of biomass gel foam used for inhibiting coal spontaneous combustion (CSC), a novel highly stable biomass gel foam (SA-Ca2+@TA-GF) based on a double cross-linked structure was prepared by introducing tannic acid (TA) into a gel form (sodium alginate/calcium L-lactate/composite foaming agent). FT-IR confirmed the formation of the double cross-linked structure. The effects of TA concentration on the performance of SA-Ca2+@TA-GF were analyzed, considering gelation time, half-life, film microstructure, and strength. With the addition of 1.6 wt% TA, SA-Ca2+@TA-GF forms a dense foam structure with a gelation time of 10 min. The half-life of the gel foam improves from 0.4 to 30 days and the strength increases by 72.9% compared to that of foam without TA. The inhibition experiments show that SA-Ca2+@TA-GF can asphyxiate coal, thus effectively inhibiting coal oxidation. Additionally, it can increase the temperature of coal at the rapid oxidation stage by 60 °C, and the CO inhibition rate is up to 79.6% at 200 °C. The fire-fighting experiment shows that SA-Ca2+@TA-GF can effectively cool coal and quickly extinguish fires. This study provides a simple method to prepare highly stable biomass gel foams, which is useful for improving the efficiency of gel foams in inhibiting CSC.