The 45-year-old actress said in the May issue of Women's Health she didn't see herself having children until she met the 38-year-old actor.
"It was the furthest thing from my mind," Mendes told the magazine.
"Ryan Gosling happened," she said. "I mean, falling in love with him. Then it made sense for me to have... not kids, but his kids. It was very specific to him."
Mendes and Gosling met on the set of The Place Beyond the Pines in 2011. The couple welcomed their first child, daughter Esmeralda Amada, in 2014, and daughter Amada Lee in 2016.
"We're just starting to get out of survival mode," Mendes said of parenthood. "I'm starting to feel like a person again."
"Every day is such a learning experience -- they challenge you in so many ways. Like, I'm their mom," she added. "I have to rise up, and hopefully, most of the time I do, but sometimes it's definitely maddening."
Mendes is focused on her daughters and her new Eva Mendes Collection fashion collection with New York & Company. She previously told Shape she prefers to stay home than attend red carpet events.
"What people don't know about me is that I love being home," the star said. "Instead of hitting the red carpet, I'd rather be with our girls."
Mendes last appeared in Gosling's directorial debut, Lost River, which debuted in 2014.