The majority of language learners who are afraid to speak their target language have suffered some type of trauma. A Chinese girl on italki told me that after someone made fun of her English, she was afraid to speak English after that (even though, in my opinion, she speaks English quite fluently). One of my friends who came to France years ago to learn French suffered a lot of teasing from the locals and now she is unable to speak to me in English even though she really wants to learn English.
So, part of the solution is that language learners need to find the right people to practice with, i.e. - people who are encouraging and open-minded, instead of people who are malicious and discouraging. I found that polyglots, particularly those who learned a language as an adult (after being 20 years old), have suffered through the process of learning a new language, and so they are a lot more open-minded and supportive.
The other is the misconception of: "I will speak my target language once I have perfect grammar and vocabulary." Writing and reading are completely different skills from speaking, and spending 5 years perfecting one's grammar just means that one will not be able to speak after 5 years of study. Speaking is a skill that can only be learned by making tons of mistakes, forgetting words, using the wrong conjugation, and repeating this process of mistakes-and-learning-from-mistakes for months and months. You need to emphasize to your students that mistakes are GOOD, and that mistakes are NECESSARY.