South Korea and Romania advanced to the final after defeating favourites Italy and Russia in the semifinals, with Italy going on to take the bronze.
The third-ranked Gu and teammates Kim Jung-hwan, Won Woo-young and Oh Eun-seok won all but one of the nine bouts in the final.
"I feel very proud," Gu said trough an interpreter. "Some might think we are surprise winners, but we had faith in ourselves."
It was the second gold and the fifth fencing medal in total for South Korea at the London Olympics, only surpassed by Italy's six.
There was bronze for Jung Jin-sun in epee individual and for Choi Byung-chul in foil individual, while the South Korean women also won two medals.
"It's a good way to promote fencing around Korea as it is still relatively unknown and unpopular," said Gu, won the individual title at the 2010 Asian Games.
South Korea still had the feeling it was denied a sixth medal when Shin A-lam suffered a heavily disputed defeat in the women's individual epee Monday. The South Koreans claimed opponent Britta Heidemann of Germany scored the winning point when the match was already over.
While the jury was waging a protest by the South Koreans, Shin sat on the strip in tears for more than an hour.
"We felt very sorry for her, so we tried even harder to win medals," Gu said.
For Won, it was his second major gold medal after winning the world championship in saber individual two years ago.
"It feels like a dream, but it isn't," Won said.
The 8th-ranked Rares Dumitrescu, Florin Zalomir, Tiberiu Dolniceanu and Alexandru Siriteanu earned Romania a third Olympic saber team medal after the country won bronze in 1976 and '84.
"We have the silver medal but there is a big difference between that and gold," said Dumitrescu.
In the semifinals, South Korea defeated Italy, with world and former Olympic champion Aldo Montano, 45-37.
Romania edged world champion Russia 45-43 after the 39th-ranked Zalomir defeated second-ranked Alexey Yakimenko 5-4 in the final bout.
Italy defeated Russia 45-40 for bronze, matching its third place from the 2008 Beijing Games.
After scoring the final point, Montano waved at his teammates to join him on the strip, where they celebrated like they had won the competition.
"I will go home with a heavy neck," said Diego Occhiuzzi, who took silver in the saber individual. "Two medals, it is just crazy. This amazing crowd pushed us to this bronze medal. Awesome."
The United States, a silver medallist Beijing in 2008, was beaten 45-33 in its opening match by top-seeded Russia. The Americans then lost against China 45-28 and Belarus 45-35 to finish eighth.
"The Olympics is a very special competition," said James Williams, who also was on the team four years ago. "But it only happens on one day and it tends to be flukey one way or the other. I don't feel particularly bad, but I wish we had won. But that is sport."
Germany was looking to rebound from some disappointing results in the individual saber competition Sunday, when top-ranked fencer Nicolas Limbach suffered an early defeat at the hands of Russia's Nikolay Kovalev.
In the quarterfinals, Germany lost 45-38 to South Korea before battling past Belarus 45-40 and China 45-30 to take fifth.
Two-time defending champion France did not take part in the team event as Bolade Apithy was the only French saber fencer to qualify for the Olympics.Suggest a correction