It looks to me like a voltage regulator that somebody has built to replace the internal one.

Voltage regulators (or stabilisers) were a common fail on these instruments, so instead of replacing the internal item, some inventive person has built up an external unit inside one of 'jiffy' boxes & wired it in.

My thoughts are if you remove it, none of the minor gauges (oil/temp/fuel) will function.

Dr Terry