You can use gift funds to pay off debts to qualify for a mortgage when the gift is from an acceptable source, like a family member. Paying off higher-interest-rate credit card debt is sometimes the best way to use gift funds.
For example, Let's say your parents want to give you some money to help you buy a home. However, you don't qualify for the mortgage because your debt-to-income ratio is too high.
You can use your parent's gift to pay off credit card debts, lower your debt-to-income ratio, and qualify for the mortgage. Your parents agree to this plan and complete a gift letter to show that the funds were a gift, not a loan to you.