The Oscar-winning actress appeared as a substitute teacher, Holly Holiday, who filled in for Will Schuester when he was off sick in a storyline which aired last year.

Holly will now come back to McKinnley High to date Will – who is portrayed by Matthew Morrison – and Gwyneth will be singing in the role again.

The show’s creator Ryan Murphy said: “Gwyneth is coming back for two episodes. She's coming back specifically to date Will.

“Those two have become really good friends in real life and had really good chemistry. She's coming back as a sex education teacher. “Gwyneth and I are emailing, talking every week, ‘What are we gonna sing?’ We're trying to do something fantastic. So she'll be (in episodes) 15 and 16. She comes back to film this month and she's with us for three and a half weeks, I think."

As well as Gwyneth’s return, Ryan also revealed another episode will be based around a Lady Gaga song.

The writers based an entire show around the flamboyant pop star’s tracks last season and it proved a huge hit with viewers.

In the spring Gaga’s upcoming single ‘Born This Way’ will be used to soundtrack a storyline about school bully Dave Karofsky – who is played by Max Adler – who is a closet homosexual.

Ryan revealed to Entertainment Weekly magazine: “I love that song, it’s an anthem. This show is by nature optimistic and I think a character like Karofsky could turn to booze or pills or alcohol and kill themselves or do something dark. But I also love Max and I love that character and I sort of want that character to have a happy ending. So I don't really know what that's going to be, but I do know we're going to do a whole episode that's about that song."