The 20 year-old Argentine joins from the League Two club for an undisclosed fee and has linked up with his new team-mates at their French training camp.
Gazzaniga started his career with Valencia and his move to
"I am very happy because signing for a Premier League team is a dream," he told the club's website.
"It's mad because I only played a few matches last season - it's a crazy situation.
"The club has a lot of ambition, so I was eager to sign. I can't wait to get started."
The 6 ft 5 keeper from Murphy on the outskirts of Santa Fe and is the son of goalkeeper David, who played in Argentina, Ecuador and Peru.
Gazzaniga moved to Spain aged 15 to pursue his own career and joined Valencia in 2010, although he was released the following year.
He penned a two-year deal with Gillingham last summer and started the season as second-choice goalkeeper, before establishing himself as number one in the second half of the campaign.
Gazzaniga's performances saw him linked with a host of clubs and Southampton manager Nigel Adkins is delighted he chose the move to St Mary's.
"He is very ambitious, he is young and hungry and wants to do well for Southampton Football Club," he said.
"He was with Valencia the year before last before coming over to England and getting some games under his belt at Gillingham, which is where our recruitment department spotted him.
"He has a good stature about himself, he is a young lad who has an assured confidence about himself, which is good.
"I know from speaking with him that he has a very good attitude and work ethic, which is important for us.
"He will be in an environment that we think will help him improve under the guidance of our goalkeeping coach, Jim Stannard, and Kelvin Davis, who has a lot of experience and I know that he will take him under his wing.
"Competition for places is very important but, from a goalkeeping point of view, you always work very closely with each other."
Gazzaniga becomes Southampton's fourth signing since securing promotion to the Premier League, following the acquisitions of Jay Rodriguez, Steven Davis and Nathaniel Clyne.