How is it possible that the angels were on hand to witness the earth being created? Though we are not told exactly when angels were created, it seems to be sometime before the earth was created. 

The words found at Job indicate the angelic host was present when the earth was made.  


  Where were you when I laid the foundation of the earth? Tell Me, if you have understanding. . . when the morning stars sang together and all the sons of God shouted for joy? (Job 38: 4,7).


Now some Protestant Christians will tell us that Genesis 1:1 which states 


  In the beginning God created the heavens and the earth.


refers to the moment when all creation began.

They will also point to John 1:1 


  In the beginning was the Word.......


And say the beginning spoken of here is the same as Gen 1:1.  For example this question scoped at Jehovah’s Witnesses  and the comments indicate this is a common belief .

The account in Genesis starts with heaven and earth already created and then the preparation for mankind begins on day one. “Let there be light.”

My understanding is that the angels were created some time prior to the beginning spoken of in Gen1:1. Which would mean that first creation by God took place before the beginning in Genesis 1:1 and John 1:1.
So beginning in these verses refers to the creation of the physical universe.

If the beginning of all creation was the making of heaven and earth how is it that the angels were on hand to witness the earth being created?
You've really answered your own question. God's work of creation in no way had to begin with the physical, material universe. Since angels, like God, are spiritual beings, they were not part of God's work of creation by fiat in Genesis 1 and 2. However, they, like us, were created, unlike Jehovah God, who had no beginning.


  Before the mountains were brought forth, or ever thou hadst formed the earth and the world, even from everlasting to everlasting, thou art God (Psalm 90:2 KJV).


Since only God inhabits eternity, which of course cannot be measured in time, a question remains in my mind: Are the angels' experience and perception of time similar to (or the same as) ours? 

We cannot say with any biblical authority that God's creative work began with the angels. That God created the angels is clearly biblical, as is the likelihood they were created prior to God's calling the heavens and earth into existence. As you pointed out in your question, the book of Job seems to indicate the angels existed and were God's witnesses when he said, "Let there be . . ." (Job 38:7). The angels, in a sense, were God's cheerleaders who expressed joyfully their admiration for the wonders of God in creation. 

Allow me to go beyond your question for a moment. In human terms, there was a "time" when all there was, was God. God did not need to create anyone or anything in order to complete or fulfill himself. He chose to do so because he is love (1 John 4:8), and the nature of love is to express itself to another person or persons.  

From eternity, the Triune God enjoyed sweet fellowship within the Godhead. We can only imagine what that fellowship was like, but since God is love, love must have permeated the relationship that existed between the Father, the Son, and the Holy Spirit.

Muslims balk at such a concept. To their credit, they are in awe of God. They praise his greatness every time they pray. They also ascribe the attribute of mercy to Allah, as well as other attributes, such as omnipotence, omniscience, goodness (beneficence), immanence, and more. They do not, however, believe God is love. Indeed, how can he be if he does not exist in three persons? 

Love cannot exist in a vacuum, and since Allah, as Muslims conceive of him, is not to be associated with any other eternal personage (especially a son!), he may choose to be merciful, but he is in no way loving by nature. 

Getting back to the issue at hand. There is an unfortunate expression in theological circles today; namely, that God created all that is, ex nihilo, or out of nothing. I prefer to say that God created all that is, out of the fullness of his being. Not only did God not break a sweat during all his creative work, but he created all that is, not because he had to but because he chose to. And we, his image-bearers, have the privilege of praising him for something the angels will never experience; namely, being saved by God.

The apostle Peter tells us in his first letter that God's angels long to look into the salvation which only we can experience as sinners saved by grace. Perhaps someday in a future eternity, the angels' curiosity will be at least partially satisfied as they witness that great cloud of witnesses to God's grace praising, worshipping, and magnifying their God and Savior.