The 34-year-old actor alleged in court documents that Grace Marie Del Villar has been sending harassing emails and packages, reported TMZ.
Del Villar has claimed to be Gosling's 'twin flame' and sent him a torn magazine page featuring his 40-year-old partner Eva Mendes with contact information stapled to the page, according to court documents.
The actor also claimed that Del Villar has been bombarding his older sister Mandi with email messages, including one that read: 'I am kicking your brother's head.'
Del Villar allegedly rang the security gate and announced she was 'Ryan's twin' before leaving a doll at the gate.
More From This Section
The restraining order mandated that Del Villar stay 100 yards away from Gosling, Mendes and their nine-week-old daughter Esmeralda.
Gosling's sister Mandi also obtained a restraining order against Del Villar.
The actor returned to Los Angeles last week during a break in his film schedule.
He had been away filming the detective drama 'The Nice Guys' in Atlanta alongside Russell Crowe and Kim Basinger.