How can I gain professional experience for PhD application all by myself? I love astrophysics and wish to pursue a PhD in a good institute outside my home country India. I did a master in physics (2014) and got a summer project in astrophysics. After my master, I took up teaching. I regularly applied to PhD vacancies but haven’t got any positive reply yet. This may be due to low grades in few subjects (I got an E in quantum physics). I am aware that work experience speaks volumes; so I mailed many professors for non-stipendiary internships but it didn’t work.

I want to know if anything is there that I could do all by myself and which can be counted as a “relevant professional experience”. What other measures I could take up?
First option is going to be finding an actual job connected to astrophysics. A quick Google search brought me this job postings in Indian Institute of Astrophysics, located in Bangalore. While I cannot tell you if this institute is thriving (living in India, you possibly know that better than me), you could give it a try. Doing actual work as an engineer surely qualifies as a relevant professional experience when you apply for your PhD next time. Explore the job markets while you are still in your home country.
While you can be applying for a job in India, go on and send several more PhD applications to other institutions outside India. It never hurts to try, and you will possibly become more aware of your strengths and weaknesses in the process.
Next, there are online courses (1, 2, 3, 4, 5, 6) that you might take to reinforce your knowledge of the subject. People argue if online courses should go to your CV, but they are definitely worth taking for the sake of knowledge. Moreover, if you have had some bad grades in quantum physics in the past, a better grade in an online quantum physics course will be beneficial for your CV.
Inspired by these Quora answers: if you are thinking of a PhD studies outside India, pass the required examinations beforehand. For USA, this will likely be a Physics GRE test, and you should have that ready almost a year before your PhD program starts.
From the same Quora answer: taking part in a volunteer computation project (see a list of BOINC projects) may help you learn more about astronomy, how the actual research can be done, and (why not?) get to know some researchers outside of your country.