I have been watching a few aircraft landing videos in crosswind situations and I noticed that if the airliner missed the runway the landing gear would go back into the aircraft. So I'm wondering if this system is automatic after a takeoff or if it's controlled by the pilot manually?
The landing gear system is operated by the pilots. The extension and retraction, depend on the action from the pilot monitoring, on 2 pilots operation. The pilot has a lever on their panel, on which they select the extension (down) and/or retraction (up). Some aircraft has a system to avoid extending them on high speed, to avoid some damage, and on the ground, avoiding retracting, for obvious reasons. There are lights, green and red, indicating their position.
It's manual. Once there is positive climb the pilot will retract the gear and flaps to minimize drag.
All landing gear that I know of are all controlled by the pilots. I have never heard of an "automatic landing gear" as you describe it.
As some comments below say, there is one airplane that has/had an automatic gear (Piper Arrow) but it was not really the brightest idea because it could cause in-flight problems if not handled properly.
As the other answers point out, it generally is operated by the pilots.
In the last project I have participated in, though, flap and gear control was performed by an automated system (see slide 17). The control system was automatically deploying the flaps and gear at a specified location during the final approach, without any pilot intervention.
In the future there might be more aircraft that will use such automation, but not before the appropriate amendments will be done to the regulations and not before one such system will be succesfully certified.
As soon as there is a positive rate of climb, the gear is retracted because it is a large contributor to drag on the aircraft, effectively reducing its climb performance.
As a passenger you can feel this on some aircraft when the gear is deployed as you can feel the drag on the aircraft (and depending on where you are sitting, you may be able to hear the gear deploying).
Due to its large effect on the performance of the aircraft, in some aircraft the gear is also used as an impromptu air brake to reduce the speed of the aircraft - although in most modern aircraft, this function is taken care of by the air brake/spoilers.
Gear is retracted manually, usually by the pilot observing, and not by the pilot flying (PF). Usually the pilot observing will say "positive rate, gear up" and then move the lever to retract the gear - this is what you are observing in those videos.