The 28-year-old Brazilian, who returned to the Bundesliga after the winter break last season on loan at Schalke 04, will officially be presented on Monday after his medical.
"We now have another flexible and skilled player in attack," said Gladbach sports director Max Eberl in a club statement. "It was not an easy transfer but we are delighted that it worked out."
Financial details of the deal were not given.
Raffael also played under current Gladbach coach Lucien Favre at FC Zurich and Hertha Berlin.
"I have to thank him for a lot of things," Raffael said. "He developed me in Zurich and then brought me to Berlin. Now I want to pay back that trust."
Gladbach just missed out on the European spots last season, finishing in eighth place in the Bundesliga.
- Sports & Recreation