I want to know about the authenticity of these sentences. Which one is correct?
1: She came out of the room, crying loudly.
2: She came, crying loudly, out of the room.
I have heard that only participle are modified by the gerunds; therefore, It must be the case of participle "crying" or is it gerund? please confirm which one of the two sentences is correct.
 She came out of the room, crying loudly.
 She came, crying loudly, out of the room.
Both are correct. You could even use :
 Crying loudly, she came out of the room.
A gerund is a word that looks like a verb but functions as a noun. That is, it ends in -ing but it can be a subject, an object of the verb, or an object of a preposition. In  through  "crying" doesn't function as a noun (a subject or an object), so it must be a participle.
Also, gerunds never require punctuation. Note, in  through  there is punctuation: a comma in each sentence.
"crying" is not a gerund. "crying" is a participle, a present participle. How do we know that? Consider,
 She came out of the room. She was crying loudly.
'crying' and 'was' form a continuous verb form. Participle, note the word "Part" in there, means it is part of a verb. Moreover, a participle modifies a (pro)noun, like this,
She, crying loudly, came out of the room.
'crying loudly' modifies 'She'.
A final test would be to ask, "Who was crying loudly?" The answer: "She". So, 'crying' must be a participle since it functions as part of the continuous verb 'was crying'.
Here's a great resource: http://owl.english.purdue.edu/handou...g_verbals.html
All the best,