Circuit to reverse polarity
The most direct way to implement this would be to use a DPDT relay to reverse the power to the motor, along with a limit switch at each end of the door travel to cut the power when the door reaches the desired position.



The two limit switches are labeled "closed" and "open". Terminal "A" on the motor is positive relative to "B" to drive the door to the closed position, and vice-versa to drive it open. When the door is fully closed, the normally-closed switch labeled "closed" opens. Similarly, when the door is fully open, the switch labeled "open" opens.