The 25-year-old midfielder has made just five appearances for the Saints this season - two of them in the League Cup - and his contract with the club is set to expire in the summer.
Ramirez spent most of last season on loan at Hull City, scoring just once in 22 Premier League appearances.
The Uruguayan has also been capped 34 times by his country.
Boro are currently a point behind Championship leaders Hull, having lost their last two league matches, as they vie for automatic promotion back to the Premier League.
Find all the latest football transfers on our dedicated page.
Middlesbrough have signed Gaston Ramirez from Southampton on loan until the end of the season.