The deal is for $3.3 million, a source told ESPN's Jerry Crasnick.
The deal was reached before Tuesday's scheduled arbitration hearing. It calls for a $3.3 million salary this year and includes a $5.2 million club option for 2017 with a $100,000 buyout.
When the sides exchanged proposed arbitration salaries last month, Gattis asked for a raise from $526,500 to $3.85 million and the Astros offered $3 million.
Gattis had surgery Feb. 10 to repair a sports hernia, and the Astros said then that he would be sidelined for four to six weeks.
Acquired from Atlanta in January 2015, Gattis hit .246 and led the Astros with 27 homers and 88 RBIs, both career highs.
The Associated Press contributed to this report.