Drilling fluid is a yield stress fluid, which can trap invading gas in the wellbore. The entrapment of gas leads to the decrease of ECD and the inaccuracy of wellbore pressure calculation during gas kick. This study established a mathematic model for predicting the ultimate gas entrapment concentration (UGEC) by coupling the stress field between multiple bubbles. The prediction model for UGEC is related to drilling fluid yield stress, the mean bubble size and the density difference. The UGEC is linearly with the dimensionless drilling fluid yield stress Bi (=τy/(ρm-ρg)gRb) and there is no gas can entrapped in the drilling fluid for Bi less than 0.143. Based on the UGEC model, a new method for calculating the wellbore pressure is established. The results of model simulation show that with the increase of the drilling fluid yield stress, the height of the invaded gas front and the peak value of the wellbore pressure decrease. Thus, we proposed to inject the high yield stress slug in the well bottom to minimize the damage caused by the gas invasion under the shut-in situation.