The gas production from stacked gas deposits with coalbed, shale, and tight sandstone reservoirs in the coal measure is an effective new technology to enhance per well gas production. However, previously developed numerical models for stacked gas deposits usually target one or two reservoir types. The contribution and impact mechanism of crossflow and two-phase flow on gas production from stacked gas deposits are unclear for the stacked gas deposits with coalbed, shale, and tight sandstone reservoirs in the coal measure. This paper develops a numerical simulation model for the gas production from stacked deposits with shale, coalbed, and tight sandstone reservoirs. This numerical simulation model considers the two-phase flow, gas diffusion in different porosity, pore deformation, and interlayer crossflow. After verification with available data from the literature, this numerical simulation model is used to explore the effects of crossflow across interlayers and two-phase flow on gas transport and production efficiency. The simulation results show that the main sources of gas production from stacked deposits are shale and coalbed reservoirs. The gas in these two reservoirs can be rapidly transported to the wellbore through the tight sandstone reservoir. The gas production from stacked deposits will be underestimated without the interlayer crossflow and overestimated if the two-phase flow is ignored. The gas production efficiency can be effectively improved through the enhancement of the crossflow rate at the interlayer and the decrease of the water saturation in the reservoir.