Goals from the Uruguayan and Jos Hooiveld gave the Saints a comfortable victory in the third round of the Capital One Cup, having made 11 changes from their win over Liverpool.
The Uruguay international's early strike, a remarkable volley, gave the Premier League team a perfect start, but its victory was not secured until the defender's 83rd-minute header.
Sean O'Driscoll made four changes to the City side that lost 3-2 to Swindon Town in League One on Saturday, with Louis Carey (illness) and James O'Connor (thigh) among those left out as Stephen McLaughlin was handed his full debut. Mauricio Pochettino, meanwhile, changed his entire team from their 1-0 win at Liverpool, with Guly Do Prado and Tadanari Lee making their first appearances of the season.
Jack Cork, who is yet to feature in the Premier League this season, was back in the side after playing in the 5-1 second-round triumph over Barnsley. The 24-year-old was immediately involved as he looked to slip in Ramirez, only to see his pass cut out.
Ramirez did get on the score sheet soon after, however, delighting the crowd 15 minutes in with a stunning volley from James Ward-Prowse's flick-on.
Pochettino's side was well in charge of the game and could have doubled its advantage soon after when Lee was denied by City goalkeeper Elliot Parish.
The visitors then had a chance of their own as Jay Emmanuel-Thomas' shot was parried away by Kelvin Davis, and they could have drawn level before halftime when Derrick Williams headed over a free kick from Brendan Maloney.
Guly had the best chance of the early stages of the second half, but he failed to guide his header from Ward-Prowse's corner past the alert Parish.
Southampton struggled for rhythm in the second period, though, and the home crowd became increasingly restless as City pressed for an equalizer, with a good cross from Emmanuel-Thomas just failing to find the boot of McLaughlin.
But Pochettino's side then confirmed its place in round four when Hooiveld diverted Ward-Prowse's in-swinging corner home.