"She was around when I was writing it and she was very helpful in many aspects of the process," Gosling, 34, said.
The "Notebook" star said Mendes, 41, worked in several departments, reported People magazine.
"She interned with the costume department, and with the production design team and she was also acting in it, so she wore a lot of hats on the film."
The couple, who welcomed daughter Esmeralda in September 2014, fell in love while filming 2012's "The Place Beyond the Pines".
Written by Gosling, it centres on a single mother that gets thrown into the underworld as her son finds a mysterious underwater town.