Depending on your selling dealer, getting the refund for gap insurance can be quite difficult. The basic structure for gap reimbursement is as follows: customer contacts dealer for gap refund, dealer contacts gap company for refund, gap company sends refund to dealer, dealer sends check to finance company if vehicle is still financed, or dealer sends the check to you directly if the vehicle is paid off. Some states might have a slightly different process.
This process can take months mainly because dealers are slow to help with this. They are essentially losing money so they basically don't care. A lot of times they simply don't even start the refund process even though they stated they did. A lot of times they also hold on to the refund check and claim they never received it. I used to work in auto finance for a many number of years, these were all common tactics used by dealerships.
FYI- for people who have total loss claims on financed vehicles and get upset about how long it takes to payoff your total loss vehicle. A lot of times dealerships literally sit on those backend product refund checks that can significantly slow the loan payoff process.