Berdych, the top-ranked player in action this week in France, took the opening set 6-4 as he pounced on the lone break point he earned, but Gulbis fought back to claim the second set in an epic tie-break that ended 12-10.
The Czech got his nose in front as he broke in the fifth game of the deciding set, however, clinching what turned out to be the only break point for either man in the final set and hanging on to win.
Berdych will face either Julien Benneteau or Jerzy Janowicz in the quarter-finals.
Jo-Wilfried Tsonga delighted the home crowd as he beat Russia's former world top five star Nikolay Davydenko 7-6(1) 6-3.
Tsonga, who is seeded third, will play Australia's Bernard Tomic in the quarter-finals.
Sixth seed Gilles Simon fought through his opening match at ATP Marseille against Robin Haase to win 7-5 7-5.
Simon, the world number 13, met stiff resistance from the Dutchman, with both players earning plenty of chances to break as both failed to get their serves working properly.
It was Simon who held his nerve best when it mattered, however, saving five of the seven break points earned by Haase and converting four of the 12 chances he earned against his opponent.
Simon will face Roberto Bautista in the second round.
Second seed Milos Raonic was sent packing from the Memphis International as Jack Sock won a tight first-round encounter 6-3 5-7 7-5.
The Canadian world number 14 arrived at the tournament in good form, having won the title in San Jose less than a week ago.
Defeat to Sock, ranked 168 in the world, was all the more surprising given Raonic's record in Memphis - he reached the final for the past two years.
Victory for American Sock was his first of the 2013 ATP Tour season.
“It’s always nice to get the highest-ranked win of my career,” Sock said. “And it was nice to get that first win of my career. I hope to carry the momentum on this week.”
World number 18 Tommy Haas, who fell to Raonic in last week's final in California, beat Evgeny Donskoy 7-6(6) 6-4 to move into the second round.
Haas, at the age of 34, is the oldest player in the tournament, which he has won three times before, including his first career title.
In Argentina, top seed David Ferrer came through his opening ATP Buenos Aires match against local hope Agustin Velotti, winning 6-4 6-1.
Ferrer will face another local player in the second round, David Nalbandian, who beat Carlos Berlocq 6-3 2-6 6-3.
Marseille Open results:
Gilles Muller (Luxembourg) beat Marcel Granollers (Spain) 7-6(2) 7-6(1)
3-Jo-Wilfried Tsonga (France) beat Nikolay Davydenko (Russia) 7-6(1) 6-3
1-Tomas Berdych (Czech Republic) beat Ernests Gulbis (Latvia) 6-4 6-7(10) 6-4
Bernard Tomic (Australia) beat Somdev Devvarman (India) 6-3 7-5
6-Gilles Simon (France) beat Robin Haase (Netherlands) 7-5 7-5
Dmitry Tursunov (Russia) beat Edouard Roger-Vasselin (France) 7-5 6-3
Julien Benneteau (France) beat Lucas Pouille (France) 7-6(0) 6-3
Memphis International results:
Jack Sock (U.S.) beat 2-Milos Raonic (Canada) 6-3 5-7 7-5
Marinko Matosevic (Australia) beat Go Soeda (Japan) 7-6(6) 6-4
7-Alexandr Dolgopolov (Ukraine) beat Bjoern Phau (Germany) 6-3 6-4
6-Tommy Haas (Germany) beat Evgeny Donskoy (Russia) 7-6(6) 6-4
Donald Young (U.S.) beat Xavier Malisse (Belgium) 5-1 (Malisse retired)
Lleyton Hewitt (Australia) beat Lu Yen-Hsun (Taiwan) 2-6 7-6(3) 6-4
ATP Buenos Aires results:
David Nalbandian (Argentina) beat Carlos Berlocq (Argentina) 6-3 2-6 6-3
Marco Trungelliti (Argentina) beat Facundo Argueello (Argentina) 4-6 6-3 1-0 (Argueello retired)
6-Fabio Fognini (Italy) beat Guillermo Garcia-Lopez (Spain) 7-5 6-3
1-David Ferrer (Spain) beat Agustin Velotti (Argentina) 6-4 6-1
- Sports & Recreation