The team had been trying to trade Gonzalez for the last several weeks, giving him more playing time than usual in a likely attempt to showcase him to other teams. He would have likely been cut before opening day if the team had not found a trade partner, since it wanted to keep Alex Cora as a utility infielder.
In return, the Nationals get Davis, a 6-foot-4 right-hander who went from high-A ball to Triple-A Portland in the Padres' system last year. He has a career mark of 8.5 strikeouts per nine innings in the minors, and a solid 1.236 WHIP in three seasons. A 13th-round pick in the 2008 draft, Davis played at Stanford with Nationals closer Drew Storen. He has a chance to be a solid prospect for the team; it's likely he'll start at Double-A Harrisburg, having only pitched one game at the Triple-A level last year.
Davis also made a remarkable recovery after getting hit in the face with a line drive while playing in the Cape Cod League. ESPN.com wrote about his return here.