Remove the bulb holder from light housing and short it out to a known good earth point and see if that fixes the problem. In my opinion, you have an earth, but not a good one. Were your tail lights dim also? If the earth and tail lights are OK, change or bypass the brake light switch to test. If it is still dim, try running a wire from the brake switch to the light to prove your wiring is OK. Is the globe holder OK?
Good luck with your fault finding,