Longoria played for the Long Beach State University baseball team, was the CSN Bay Area 2005 Cape Cod League MVP, and was named the 2006 Big West Conference Co-Player of the Year.
As a result, he attended Rio Hondo Community College during his freshman season, before Long Beach State offered him a scholarship.
In his freshman season, Longoria earned first-team All-State honors and was offered a scholarship by Long Beach State University.
Because Long Beach State already had an established shortstop, Troy Tulowitzki (who became a five-time all-star over a 13-year MLB career), Longoria played third base.
This earned him a promotion to the Double-A Montgomery Biscuits, where he hit .267/.266/.486 with six home runs through the end of the season, and hit .345 in the postseason, including a walk-off two-run home run in the Southern League Division Playoffs to put Montgomery into the championship.
Starting the year with Montgomery, Longoria hit .307/.403/.528 with 21 home runs and 76s RBI in 105 games for the Biscuits before a late-season promotion to the Triple-A Durham Bulls.
In October 2007, sportswriter Ken Rosenthal opined that Longoria "might be next season's Ryan Braun, making a rapid ascent to the majors.
He was expected to start at third for Tampa Bay in 2008 with the move of Akinori Iwamura to second base, but ultimately failed to make the opening day roster and was optioned to Triple-A Durham.
According to reports, the Rays elected to send him down to complete his development, citing his short 31-game stint in Durham and drawing comparisons to the seasons of two other highly heralded third-base prospects.
On July 19, 2008, Longoria hit his first career grand slam off Toronto's Roy Halladay in the fifth inning as part of a 6–4 winning effort.
[18][19] There was a general consensus that this contract was among the most team-friendly, in terms of dollars per Wins Above Replacement, in Major League Baseball.
[20] On July 10, Longoria won the 2008 All-Star game AL Final Fan vote over outfielder Jermaine Dye of the Chicago White Sox, outfielder José Guillén of the Kansas City Royals, first baseman Jason Giambi of the New York Yankees, and second baseman Brian Roberts of the Baltimore Orioles.
[23] On September 20, Longoria caught the game-ending out, from Joe Mauer in foul territory as the Rays clinched their first playoff spot in team history.
[32] In 2010, Longoria hit for the highest average of his career at .294 and was selected to play in the All Star Game for the third consecutive season.
On September 28, 2011, Longoria hit a walk-off home run in extra innings against the New York Yankees to give the Rays an 8–7 victory, and more importantly, a spot in the playoffs.
[34] Earlier in the month, the Rays were facing a deficit of nine games in the wild card race to the Boston Red Sox.
Longoria's home run came just three minutes after the Red Sox suffered a walk-off loss to the Baltimore Orioles.
[38] Longoria drove in his 500th career RBI after hitting a sacrifice fly vs. the New York Yankees on June 20, 2013, to plate Sean Rodriguez.
[40] During the 2013 American League Wild Card tie-breaker game vs. the Texas Rangers, Longoria hit a two-run home run in the third inning.
[53] Offensively, Longoria had a down year, slashing .261/.313/.414 with 20 home runs, however he excelled defensively, and won his third career Gold Glove Award.
[54] On December 20, 2017, the Rays traded Longoria and cash considerations to the San Francisco Giants for Christian Arroyo, Denard Span, Matt Krook, and Stephen Woods.
[59] On August 21, 2020, at Oracle Park, in a 6–2 win over the Arizona Diamondbacks, Longoria hit his 300th career home run off of Robbie Ray with one out in the bottom of the third inning.
[61] On July 16, 2021, Longoria was placed on the 60-day injured list with a left shoulder sprain, and he missed half of the season.
[63] On March 30, 2022, it was announced that Longoria would miss Opening Day and be out six weeks following surgery to repair a torn ligament in his finger.
[65] On November 10, 2022, the Giants declined their $13 million contract option on Longoria, making him a free agent for the first time in his career.
[67] On June 27, Longoria homered off of Taj Bradley of the Tampa Bay Rays, giving him the distinction of having hit home runs against all 30 MLB teams.
When asked as a college baseball player in 2005 about the name similarity, he admitted that he got "ragged on it a lot, but I don't mind.
Longoria spoiled Brandon Morrow's attempt with a putt-shot to the Blue Jays' second baseman, who was unable to make a play on it.
[84] A video showing Longoria being interviewed during batting practice when a foul ball flies in the direction of the reporter and is intercepted bare handed by him was published on YouTube on May 6, 2011.
[86] Fact-checking website Snopes concluded the video was a fake, citing the absence of safety equipment, and the proximity of the reporter to the field.