The dryer door may not close because the latch is missing or bent or the strike is broken. In addition to buying a new latch and strike, also have 2 flat head screwdrivers, a pair of pliers and a roll of masking tape on hand for repairs.
Dryer door latches can be fixed fairly quickly, and they don't require a service technician. The necessary parts are cheap and available at any appliance store. Make sure to unplug the dryer for safety before beginning repairs. Also turn off the gas supply shutoff valve if the dryer is gas.
First, pull out the broken latch with the pliers. To install the new latch, firmly insert it into the empty slot until the tabs on the back lock into place.
Next, cover the area around the strike with the masking tape to protect the dryer's finish. Shove one screwdriver into the strike and push the metal locking mechanism inward. Place the second screwdriver under the edge of the strike and lift up to remove it. The new strike can now be popped into place.
Remove the tape, wipe off any tape residue, and close the door. If the parts are installed correctly, the door should fit snugly and the dryer should start as normal.