The 25-year-old has made just one appearance for the Lions this campaign and heads to Ashton Gate in search of regular first-team football.
Robins boss Sean O'Driscoll told the club's official website: "The injury to Lewis Dunk and the expiry of his loan has left the squad once again short of defensive options.
"Brendan Moloney is close to a suspension as he is on four bookings, so an additional defender has been a priority for some time.
"Karleigh has a wealth of experience in League One with Brentford, where he played over 150 games. Principally a centre-back or right-back, he is a quick no-nonsense defender who give us some much-needed strength in depth in one or two positions."