The following history of the appearance of Shalagram and Tulasi is from the Brahma-vaivarta Purana. Though the description there is quite elaborate, we are presenting it here in brief.
There was once a king named Vrsadhvaja who, despite arriving in a dynasty of pious Vaishnava kings, was strictly devoted to Lord Shiva. He had no faith in Lord Vishnu or any of the demigods, and even began to criticize the worship of Lord Vishnu. Seeing the offensive behavior of Vrishadhvaja, Suryadeva cursed him to lose all his wealth and power. He and two generations of his descendants thus became destitute until the appearance of Dharmadhvaja. - Dharmadhvaja and his wife very devotedly worshiped Lakshmidevi to gain her favor and thus a plenary portion of Lakshmi entered his wife's womb.
On Kartika Purnima at a time marked with every auspicious sign, the wife of Dharmadhvaja, Madhavi, gave birth to a very beautiful daughter. She was decorated with all fortunate signs and grew to be an exquisitely beautiful young girl never aging beyond sixteen years. Her beauty stole the mind and heart of everyone, and being impossible to compare her with anyone else, She became known as Tulasi (matchless). - Leaving home, Tulasi went to Badrivan where she performed severe penance's with a desire in her mind that Lord Narayana himself become her husband. Pleased with her austerities, Brahmaji appeared before her and asked what boon she desired. Tulasi explained to him, "In my pervious birth, I was a gopi named Tulasi. By my wonderful good fortune, I was able to became the very dearly beloved maid servant of Lord Krishna. One day in the rasa-mandala, Radharani angrily cursed me to be born on the earth in human society. Thus leaving my divine body, I have taken my birth on the earth in this present form.
Now I desire the boon of attaining Lord Narayana as my husband." - Lord Brahma replied, "There was one cowherd boy named Sudama who also received Radharani's curse to be born on the earth. By that curse he has been born in the family of demons and is now famous on the earth as Sankhacuda. He has done extreme penance's to attain certain boons and to get you as his wife. Thus in this life he will become your husband for some time. Later by the influence of lila you will curse Lord Narayana, but accepting your curse, Lord Narayana will then become your husband. Lord Vishnu will love you more dearly than His own life, and without your presence all puja will be fruitless. By my boon, becoming the presiding deity of all the trees, you will freely enjoy unlimited happiness in the constant association of Lord Vishnu." - Sankhachuda, receiving his desired benedictions along with an all-auspicious protective shield (kavaca) from Lord Brahma, came to Badrivan where he met Tulasi. As they were conversing with each other, Lord Brahma appeared on the spot and said, " Sankhachuda, please accept this young maiden as your wife."
Turning to Tulasi he told her, "After the death of Sankhachuda, you will obtain Lord Vishnu as your husband." - The other boon that sankhachuda received from Lord Brahma was that as long as the chastity of his wife was not violated, no one would be able to kill him. Thus becoming very arrogant, he began to terrorize all the demigods and human beings. Severely afflicted by his attacks, the demigods approached Lord Shiva and begged him to protect them. Then Lord Shankara went there and personally began to fight with Sankhachuda. - Meanwhile, Lord Vishnu made a plan to destroy the chastity of Tulasi. While Lord Shiva and Sankhachuda were ferociously fighting, Lord Hari in the form of a brahmana arrived on the battlefield. He said to Sankhachuda, "Please give your kavaca in charity to me, a brahmana." Then Sankhachuda immediately gave Him the kavaca in charity . That same Lord Hari, disguising Himself as Sankhachuda then went to see Tulasi.
Deceiving her in this way, He began to enjoy with her as if He were her husband and thus broke her chastity. - The Bhavisya Purana goes on for great length to point out that there was certainly no fault on Lord Vishnu's part. He wanted to maintain the benediction given by His devotee Lord Brahma to Sankhachuda, and at the same time He wanted to protect the demigods and devotees. For this purpose He created this particular pastime with the appearance of improper behavior. But since Tulasi is the plenary part of Lakshmidevi, she is actually the wife of Lord Vishnu. - At that very moment Sankaraji killed Sankhachuda on the battlefield. When Tulasi understood all that had happened, she said, "By deceiving me, you have broken my chastity, and killed my husband. You're absolutely stone hearted! Thus I curse you to remain on earth as a stone!" - Lord Hari said, "For many years you underwent very difficult penance's to achieve Me. At the same time, Sankhchuda has also done severe penance's to get you. By the result of his austerity, he enjoyed you as his wife and has now gone to Goloka.
Now you will get the fruit of your penance's. Leaving this mortal body and taking a divine form, you will always remain with Me. Your present body shall turn into the river Gandaki, and from your hair will grow many trees famous as Tulasi.
To fulfill your curse, I will become a stone (Shalagram-shila) and will always live on the banks of the Gandaki River. The millions of worms who live in that place will adorn those stones with the sign of My cakra by carving them with their sharp teeth." After this Lord Vishnu began do dwell perpetually in the waters of the Gandaki River in the form of stones.
According to the Gautamiya Tantra, "a stone from any place other than the Gandaki River in Nepal can never be a Shalagram Sila." In Sri Hari-bhakti-vilas it is stated, "merely by touching a genuine Shalagram Sila one becomes free from the sins of millions of births, so what to speak of worshiping Him. By puja of Shalagram Sila one gains the direct association of Lord Hari." The Skanda Purana states that, "a genuine Shalagram Sila is directly a manifestation of the Supreme Lord Vishnu and does not require any installation."
It is further stated that, "the sale or purchase of a Shalagram Sila is strictly prohibited. Anyone who attempts to determine the material value of a Shalagram Sila will live in hell until the end of the universe. The area within a radius of twenty-four miles from where a Shalagram Sila is worshiped is considered a holy place (tirtha). Anyone who sees, bathes, worships, or bows to a Shalagram Sila will receive the same piety as doing millions of sacrifices and giving millions of cows in charity."
"Without having accumulated pious activities, it is very difficult to find a Shalagram Sila in this world, especially in the age of Kali-yuga." In the Padma Purana it is stated, "if a devotee who is properly initiated in prescribed mantras does the puja of Shalagram Sila, he will attain the Supreme Lord's spiritual abode without a doubt."
Sastric evidence from Sri Hari-bhakti-vilas translated by Sri Padmanabha Goswami, Sri Radha-ramana Temple, Vrindavan, U.P., India.