The time- and angle-dependent line and continuum emission from a dense torus around a cosmological gamma-ray burst source is simulated, taking into account photoionization, collisional ionization, recombination, and electron heating and cooling due to various processes. The importance of the hydro-dynamical interaction between the torus and the expanding blast wave is stressed. Because of the rapid deceleration of the blast wave as it interacts with the dense torus, the material in the torus will be illuminated by a drastically different photon spectrum than that observable through a low-column-density line of sight and will be heated by the hydrodynamical interaction between the blast wave and the torus. A model calculation to reproduce the Fe K alpha line emission observed in the X-ray afterglow of GRB 970508 is presented. The results indicate that similar to 10(-4) M. of iron must be concentrated in a region of R less than or similar to 10(-3) pc. The illumination of the torus material due to the hydrodynamical interaction of the blast wave with the torus is the dominant heating and ionization mechanism leading to the formation of the iron line. These results suggest that misaligned gamma-ray bursts may be detectable as X-ray flashes with strong emission-line features.