The 24-year-old has scored twice in 18 appearances this season but has found himself out of favour at Priestfield.
Montrose, who came through Wigan's youth system, has made 61 appearances in total for the Gills since joining from Wycombe in 2011.
Oxford boss Chris Wilder told his club's website: "Lewis has played over 100 games and is a very good player at this level.
"We wanted to add a midfielder to strengthen that department and we are fortunate to be able to bring in someone of Lewis' quality."
Montrose is unable to play in Oxford's FA Cup tie with Sheffield United after appearing in Gillingham's 2-0 second-round defeat to Preston.
- Sports & Recreation