could be the earth point for the tailgate which is the tailgate hinge pins,they get rusty over time and dont make good contact.try tapping them back n forth with a hammer n punch and some wd40 see if it helps.
could also be the tailgate solenoid thats given up the ghost.press the boot button and see if it makes any noise