I'm not 100% sure about this but I'd be surprised if you were not able to get relief on the value you need to repay so long as it occurs in the same tax year as you earned for the rating. I of course don't know this for sure but it seems reasonable in my head and so you should be able to get the tax back from HMRC, thus making it Gross pay anyway. Give HMRC a call, they're actually quite helpful on such matters