Click, 42, served as vice president of baseball operations for Tampa Bay from 2017-19. The Yale graduate joined the Rays organization in 2006 and gradually worked his way up in the team's front office.
Click is expected to be formally introduced Tuesday.
"I am excited to join the Astros family," Click said in a statement Monday. "The Astros are a progressive and innovative organization with a deeply talented group in the front office. I am grateful to [owner] Jim Crane and the Astros for giving me this opportunity to help lead this team to more championships."
Click will take over for former Astros general manager Jeff Luhnow, who was fired by the team last month in the wake of a Major League Baseball investigation that found the Astros cheated by using an illegal camera-based system to steal signs of opposing teams.
"James has had an impressive career," Crane said in a statement. "He is a respected leader who has progressed in this game across all aspects of baseball operations and he has built great relationships with both front office and clubhouse personnel. I am thrilled to introduce him as our new general manager. He is a great addition to the Astros."
According to a nine-page report released by MLB commissioner Rob Manfred, the Astros used the elaborate sign-stealing scheme during the regular season and postseason of their World Series-winning 2017 campaign and part of the 2018 regular season.