Gosens, 27, who has been sidelined since September with a hamstring injury, will leave the Bergamo side after joining from Heracles Almelo in 2017.
"Inter Milan are delighted to announce that an agreement has been reached with Atalanta for the signing of Robin Everardus Gosens," the Italian champions said.
"The German wing-back joins the club on loan with an obligation to buy if certain conditions are met," they added.
According to reports the potential purchase fee for Gosens is 25 million euros ($27.8 million).
He will feature alongside centre-back Alessandro Bastoni again after the pair played together for a season at the Gewiss Stadium.
"He already told me a couple of years ago about this club," Gosens said.
"It was not a difficult decision. I didn't need much convincing. I know what a great club Inter are," he added.