Gavin won the 2003 State Championship with Horizon High School in Scottsdale, Arizona, and was named Defensive Player of the Year and to the all-area first-team. In Arizona Gavin played for the Sereno Golden Eagles youth club with current teammate Brandon McDonald and with current MLS players Robbie Findley and Rob Valentino. After high school Gavin played at the University of Portland starting in 2004. Playing for the Pilots, Gavin was named West Coast Conference Freshman of the Year and Most Outstanding Defensive Player of the Nike Portland Invitational in in 2004, and made significant contributions to the Pilots on-field successes over the next four years, starting over 50 games and scoring five goals.
Gavin was the 4th overall pick in the 2008 MLS Supplemental Draft, selected by the Los Angeles Galaxy, and he made his MLS debut in Galaxy's first match of the 2008 season against Colorado Rapids on March 29, 2008.