The Dodgers agreed to terms with Tony Gwynn Jr. on a two-year contract Monday, less than five hours before the deadline for tendering contract offers to players who, like Gwynn, are eligible for arbitration.