The selection of Gale crater as the Mars Science Laboratory landing site took over five years, involved broad participation of the science community via five open workshops, and narrowed an initial >50 sites (25 by 20 km) to four finalists (Eberswalde, Gale, Holden and Mawrth) based on science and safety. Engineering constraints important to the selection included: (1) latitude (±30°) for thermal management of the rover and instruments, (2) elevation (<-1 km) for sufficient atmosphere to slow the spacecraft, (3) relief of <100-130 m at baselines of 1-1000 m for control authority and sufficient fuel during powered descent, (4) slopes of <30° at baselines of 2-5 m for rover stability at touchdown, (5) moderate rock abundance to avoid impacting the belly pan during touchdown, and (6) a radar-reflective, load-bearing, and trafficable surface that is safe for landing and roving and not dominated by fine-grained dust. Science criteria important for the selection include the ability to assess past habitable environments, which include diversity, context, and biosignature (including organics) preservation. Sites were evaluated in detail using targeted data from instruments on all active orbiters, and especially Mars Reconnaissance Orbiter. All of the final four sites have layered sedimentary rocks with spectral evidence for phyllosilicates that clearly address the science objectives of the mission. Sophisticated entry, descent and landing simulations that include detailed information on all of the engineering constraints indicate all of the final four sites are safe for landing. Evaluation of the traversabilty of the landing sites and target “go to” areas outside of the ellipse using slope and material properties information indicates that all are trafficable and “go to” sites can be accessed within the lifetime of the mission. In the final selection, Gale crater was favored over Eberswalde based on its greater diversity and potential habitability.