Help selecting zener diode and resistor values (reduce voltage to talk to raspi GPIO)
Raspberry Pi has 3.3V I/O, so applying 5V to a GPIO will fry it. 

You could use a simple voltage divider. Two 10K resistors, for example. 

Using an optoisolator such as a 4N35 would be safer, as below, because you would not need to tie the ground of the RPi together with the ground of the garage door opener.  







simulate this circuit &ndash; Schematic created using CircuitLab

When the +6V (relative to the 0V) is present, the infrared LED inside the 4N35 turns on, illuminating the phototransistor and causing it to conduct, making the GPIO go low. When the +6V input is less than about 1V, the LED is off and the GPIO goes high.