Surgery of the gums for treating swollen & infected gums is called flap surgery. It is performed to restore the gum level on the tooth surface where recession has begun and also to preserve bone from being lost due to which teeth can become loose.