Inverse a frequency response
What you're most probably looking for is a FIR filter designed using a window filter design method.

Essentially, you could argue "Hey, I know how I would like my filter's amplitude vs. frequency diagram to look like" (and use the inverse of your measured gains as exactly that), and then argue "OK, I want to multiply my signal's spectrum with this equalizing spectrum, so let's instead convolve the signal with this spectrum's inverse Fourier transform". And that actually works – but you get into a lot of problems because of effects of the fact that your filter "template" essentially has limited length, and you get spectral leakage. So you add windowing to the method, and tadah, get a usable method of designing a filter.

The article of this name on DSPRelated might be of interest.