The sixth-seeded Czech was looking to reach the second round for the eighth straight year but lost 7-6 (5), 7-6 (4), 7-6 (4) on Centre Court in the biggest surprise in the men's draw on the opening day at the All England Club.
Berdych lost to Rafael Nadal in the final in 2010 after beating six-time champion Roger Federer in the quarterfinals. He struggled to counter Gulbis' serve on Monday, though, with the Latvian hitting 30 aces.
Both players were broken once in the second set — with Berdych converting the only break point he earned in the match — but Gulbis proved stronger in every tiebreaker.