Petit was signed by the Oakland Athletics as a non-drafted free agent on July 17, 2001, at 16 years of age.
Oakland Athletics
Petit made his major league debut on May 18, 2008, with the Oakland Athletics. He appeared in 14 games during the 2008 season, splitting time between second base and shortstop, and batted.348/.400/.435. For the 2009 season, he played in 11 games, splitting his time between second base and third base. Petit was designated for assignment on February 1, 2010, and then sent outright to the minors.
Petit signed a minor league contract with the Cleveland Indians on January 19, 2012. He spent all of 2012 with Triple-A Columbus, hitting.260/.320/.403 with 10 HR and 45 RBI in 111 games, 82 at shortstop.
Second stint with Padres
He played the 2013 season in the San Diego Padres organization. With AAA Tucson, Petit batted.292/.344/.380 in 503 at bats.
Houston Astros
Petit signed a minor league contract with the Houston Astros on January 14, 2014. He played 37 MLB games for the Astros, hitting.278./.300/.423 with 2 home runs and 9 RBIs. Batting.297/.340/.457 in 317 at bats with the Oklahoma City RedHawks in AAA, he was a 2014 Pacific Coast League All Star. He was outrighted from the roster on December 22.
The Astros traded Petit to the New York Yankees for cash considerations or a player to be named later on April 1, 2015. He was optioned to Triple-A on April 28. He was recalled the next day on April 29, 2015, after Masahiro Tanaka went on the disabled list. On May 6, Petit was placed on the 15-day disabled list due to a bruised right hand. After coming off the DL, Gregorio was sent down to Triple-A Scranton/Wilkes-Barre on June 11. On July 25, he was designated for assignment, and he was sent outright to Scranton/Wilkes-Barre on July 27. In October 2015, Petit was made a free agent by the Yankees.
He was signed by the Los Angeles Angels of Anaheim in December 2015. In 2016 for the Angels Petit batted.245/.299/.348 in a career-high 204 at bats. On November 28, 2016, Petit was designated for assignment by the Angels. He was non-tendered on December 2.
On January 23, 2017, Petit signed a minor league contract with the Toronto Blue Jays. He spent the majority of the 2017 season with the Triple-A Buffalo Bisons, for whom he batted.253/.275/.370 in 281 at bats, and elected free agency on November 7.
Minnesota Twins
On December 8, 2017, Petit signed a minor league contract with the Minnesota Twins. He was called up by the Twins on May 1, 2018. In 2018 for the Twins he batted.246/.313/.279 in 61 at bats. With the AAA Rochester Red Wings, Petit batted.268/.313/.327 in 284 at bats. Petit was designated for assignment by the Twins on June 12, 2018. He elected free agency on October 16. Through 2018, in his major league career he had played 89 games at second base, 68 games at shortstop, 34 games at third base, six games in left field, and one game each in right field and at first base.