Hazrat Ali (A.S.) was born in the Holy Kaaba at Mecca on Friday, the 13th day of Rajab, 600 A.D. Both the Holy Prophet and Hazrat Ali belonged to the same clan. They were Hashimites, the clan of Bani Hashim. Muhammad's father was Abdulla, and that of Hazrat Ali, Abu Talib. They were brothers and their father was Abdul Muttalib. Thus the Holy Prophet and Hazrat Ali were cousins. Hazrat Ali had two brothers, Ja'far and Aquil.
Hazrat Ali's mother Fatima was the daughter of Asad, a famous magnate of the Quraish clan. She was also the aunt of the Holy Prophet, being the wife of Abu Talib, the Prophet's paternal uncle. When she was pregnant, she promised Muhammad to make over to him whatever child was born to her, be it male or female. Muhammad, aware of the issue that would be brought forth, gladly accepted the offer .
Ali's holy personality began its wonderful manifestation even during the period of his mother's pregnancy. At that time, Muhammad had not yet announced his prophethood, and yet when he passed before Fatima, who being his aunt was senior to him, she used to stand up in reverence and respect for him, and somehow something within her never allowed her to turn her face away from Muhammad as long as he was around.
When people asked her about this peculiar behaviour of hers, she would say that she could not help it, that some irresistible urge from within made her do so.
This statement was disbelieved by those who wished to test her. So one day they made her sit and they asked two strong men to hold her down when Muhammad passed by. Then they asked Muhammad if he would walk in front of her, to which he gladly agreed. As he came in front of her, Fatima began to rise and she stood erect throwing both men aside. Muhammad who alone was aware of this mystery, used to smile.
He was keenly awaiting the birth of his cousin Ali.
During her pregnancy whenever Fatima was alone, she heard from within her a mysterious whisper which was to the glorification of God.
To understand the significance and importance of his place of birth, it is essential to know a little of the history of the Kaaba.
The first House of God was rebuilt and renovated at the command of Allah by the Prophet Abraham assisted by his worthy successor, his son Ismail, under the supervision and guidance of the Angel Gabriel. The verses of the Koran say
"And remember when Abraham raised the foundation of the House with Ismail, (Praying) Our Lord! accept (this service) from us; verily Thou and Thou (alone) art the All-hearing and All-knowing." Chap. 2 Verse 127.
"And remember when we made the House a resort for mankind and a sanctuary (saying), Take ye the station of Abraham a place of prayer (For you); and covenanted with Abraham and Ismail (saying) purify ye two my House for those who make the circuit, and for those who prostrate (adoring)". Chap. 2-Verse 125.
This verse clearly depicts the purpose of the Kaaba, namely that it was to be a place of worship and that it was pure and sacred.
It was to this sacred place, the Holy Kaaba, that Providence led the mother of Hazrat Ali. She felt weighed down by intense pain when Ali was due to be born. She knelt to pray. When she raised her head from her supplication, the wall of the House split as if by a miracle, to admit her within, and a portion of the wall returned to its normal position. The Kaaba was sealed, with Fatima within.
This news spread fast all over Mecca. The keys of the shrine were brought to unlock the door but all efforts ended in failure.
On the third day of this happening, with awe the wonderstruck crowds surrounding the Kaaba witnessed the lock falling of its own accord, anti to their surprise Fatima emerged radiant from the sacred premises, cheerfully holding her new-born babe in her arms. Muhammad was waiting to receive her and her new-born child, and the first face that little Ali saw in this world was the smiling face of the Apostle of God, Muhammad, whom he greeted thus
"Assalaamo alaika ya Rasoolallah" (Peace be upon thee 0 Prophet of Allah). Thus it is an undisputed fact that Ali was born a Muslim, and his first words testified to the Prophethood of Muhammad. Muhammad lovingly took him into his arms. Ali's first bath after his birth was given by Muhammad with a prediction that this babe would give him his last bath. This Prophecy was fulfilled on the death of the Holy Prophet. The child accepted no other food other than the moisture of Muhammad's tongue, which he sucked for several days after his birth. Muhammad fondled him in his lap in his infancy, and chewed his food and fed Ali on it; he often made him sleep by his side, and Ali enjoyed the warmth of Muhammad's body and inhaled the holy fragrance of his breath.
The superstitious Arabs of those times, held that every person as he came into the world was touched b y the devil, and that was why new-born babies cried at birth. Since Ali was born in the sanctuary of God, to which the devil had no access, he did not cry at birth but was found smiling. Thus God had interposed a veil between the evil spirits and the child who was to grow up to exalt His Holy Name. Ali has been described as having been found like a priceless pearl in the shell of the Kaaba, or a sword in the sheath of Allah's House, or as a lamp found in Allah's abode shedding light all around.
The sanctified birth of Ali, as that of Prophet Muhammad, was foretold in the scriptures, when God said to Abraham, who asked for a blessing on Ishmael; "And as for Ishmael, I have heard thee: behold I have blessed him, and will make him fruitful, and will multiply him exceedingly, twelve princes shall he beget, and I will make him a great nation." (Genesis 17 : 20).
The felicitous Prophecy in Genesis 17:20 about the advent of a prophet is said to point to the appearance of Muhammad and Ali. While the `Twelve Princes' of the Mosaic Scriptures are held to be none other than the twelve Holy Imams.
Hazrat Ali's birth inside the Kaaba is unique. This is the only known occasion on which a child was born within the precincts of the holy place ever since its foundation thousands of years ago.
When Ali was about five years of age, Muhammad took him away from his uncle Abu Talib to bring him up as his own child. Thus from his earliest days, Ali came directly under the tutelage of the Apostle of God, to share his high ethics and morals. Ali was ever ready to run the risk of his own life for Muhammad at times of danger and he was affectionately attached to him with unswerving faithfulness. The cousins were so fond of each other that they lived together till death parted them.
As Hazrat Ali says : "The Holy Prophet brought me up in his own arms and fed me with his own morsel. I follower', him wherever he went, like a baby camel which follows its mother. Each day an aspect of his character would beam out of his noble soul and I would accept it and follow it as a command."
Ten years in the company of Muhammad had kept him so close and inseparable that he was one with him in character, knowledge, self-sacrifice, forbearance, braverv, kindness, generosity, oratory and eloquence. From his very infancy, he prostrated himself before God along with the Holy Prophet, as he himself said, "I was the first to pray to God along with the Holy Prophet."
According to Ibne-e-Maja page 12, Raizunnazarah Vol. lI page 158, Usdul Ghulia Vol. IV page 1, and Izalathul Khofa page 252, Ali used to say : " I have prayed to God along with the Holy Prophet seven years before any other person did."
The First Believers : Ibn Abbas, Anas, Zaid bin Aqram, Salman Farsi, and others have said, "Indeed it was Ali who was the first to declare his Islam, and some say that there is a consensus for this!" Major Jarret's translation of Suyuti's History of the Caliphs page 171.
The illustrious Ali was thus the first to readily embrace Islam and testified to Muhammad being the Apostle of God.
Muhammad used to say the three men viz., Ezekiel, Habib Najjar and Ali, who came forward first to bear testimony to the faith of their Prophets, Moses, Jesus, and himself respectively, were acknowledged as Siddiq (Ahmad Hanbal in his Manaqib; Nasai in his Khasaes; Hakim in his Mustadrak). Ali repudiated the claim of any other to this epithet(Ibn Athir).
Often did the Holy Prophet go into the depths of the solitary desert around Mecca with his wife Khadija and his young cousin and disciple, Ali, so that they might together offer their thanks to their God for His manifold blessings.
Once they were surprised in this attitude of prayer by Abu Talib, the father of Ali, who said unto Muhammad "O son of my brother, what is this religion that thou art following? "
"It is the religion of God, of His angels, of His prophets, and of our ancestor Abraham", answered the Prophet. "God has sent me to His servants to direct them towards the truth".
Then turning to Ali, his son, the venerable patriarch Abu Talib enquired what his religion was. "O Father", answered Ali,I believe in God and His Prophet and go with him."
"Well my son," said Abu Talib, "He will not call thee to aught save what is good, wherefore thou art free to cleave unto him".
The first occasion where the Holy Prophet nominated Hazrat Ali as his vicegerent was the meeting of Dawat-eAsheera.
source : http://www.imamalinet.net/