what you are looking for is called a "lead screw". Think of a long threaded rod attached to the shaft of a motor. You put a nut on the threaded shaft and attach the nut to your door (via a hinged arm). turn the motor one direction, the door opens, reverse direction, it closes. Use limit switches to stop at open or closed. Create tracks for the door to slide in. Pay attention to how you know if the door is open or closed (limit switches) so you don't break things by closing an already closed door or opening an already open one.
Real garage door openers use a chain drive but that's unnecessary for your application.