Look at each of your garage door sensors. One will likely have a green light, while the other will shine red. If the red one is flickering or blinking, your sensors are out of alignment.
Block the beam with an obstruction. The light on one of the sensors will go out all the way.
Remove the obstruction. Loosen the wingnut on the back of the sensor that went out. Adjust slightly until both lights shine and neither flicker.
Tighten the wingnuts and test the garage door. Press the "Close" button and release. The door should close without the need to hold the button continuously.