In pure technical terms, it is incorrect to state that colour balance is adjusted in digital by changing the "gain" of certain colours.
There is no such thing as "adjusting the gain" in a RAW file. What was captured in the RAW file ain't gonna change in post-processing. Of course, one can call "gain" the process of changing the d/a curve of a given colour. That doesn't make it true gain, in the electronic sense.
And digital cameras don't change the gain of the individual sensels of any colour pattern under the Bayer filter when changes are made to the white balance. What they do is change the curve their native processor applies to the RAW file to produce the sampled jpg. Very much like one does when processing the RAW file in an image editor.
Of course, this curve adjustment does not come out of thin air. Typically one gets increased noise in the given colour when "increasing the gain" of that colour. And "holes" in the histogram, as well.
But when done in moderation, the result is the equivalent of "increasing the gain" of the capture circuits by electronic means.
With film, one can actually "increase or decrease the gain" during development. It's called "pushing" and "pulling". What usually can't be done is to do so for each colour. One has to push or pull the whole emulsion, all three base colours. Speaking of colour film, of course. And that's one of the reasons why correcting the colour balance via development is very hard or simply impossible.
Of course one can compensate more or less at print or scan time, using essentially a similar technique to adjusting curves in digital cameras. But once again the diminishing returns come up: one cannot create something out of nothing. Grain and other noise effects will usually kick in.
Much better to get it right in camera, in both film and digital!