The pistol, which was kept unassembled in a safe at the family home in the town of Marsala, belonged to her father, an officer with the financial police, the local news website Marsalaviva.it reported.
The girl, named by the website as Simona Giacalone, is reported to have gathered information on the internet on how to assemble and load a gun.
She is said to have told her parents she was taking a shower before killing herself on Sunday night.
A student at Pietro Ruggieri high school, Giacalone sent her best friend a text message telling her she was about to take her life, ending with, “I love you”, the website reported.
The tragedy happened just a week after Giacalone returned from a school trip to London.
Shocked school friends flooded her Facebook page with messages of sympathy.
“Simona was a cheerful, nice girl, like many others and always very helpful…she never had problems at school, and her grades were more than good,” wrote one.
“What could have tormented her so much that she took her own life?” another asked.
"Only last week, we all shared a happy trip to London," said another.
Her funeral will take place on Tuesday.