I would suppose that what you are hearing is the metal contracting in size as the fireplace cools. I've never heard that described as a bang, though.
There is a phenomena called extinction pop that can happen when a gas burner shuts off, but that wont happen more than once.
You should probably have the fireplace checked out by a repairman to be sure there isn't some hazardous problem.