Isn't it forbidden to depict God, as stated in the Ten Commandments? Especially since Michelangelo's works such as the "Creation of Man" are inside of a religious building. How was this allowed in the time of Michelangelo?
Late medieval Christianity worked itself into an incredibly physical state. Following on Gregory the Great's dictum that art is the book of the illiterate, religious art was on one hand a source of religious instruction. In rural parishes, this was more likely to mean decorations in church--the Mouth of Hell above the tympanum; the crucified Christ flanked by saints on the rood screen; the tableau created by the priest elevating the bread and wine at the moment of consecration. In monasteries and in urban homes, and with the better-off peasants and landed nobility, the visual and material quantity of late medieval Christianity extended to devotion via images--woodcuts, illuminations, three-dimensional dioramas.
God in some form had been depicted in Christian art back to late antiquity, primarily as the Son (Christ). In earlier art, God as Father is more likely to be represented by a floating hand in the sky. By the later Middle Ages, the wise old man--as Michaelangelo will depict him--had become the standard, especially as artists began to depict the full Trinity.
These images were vehicles for instruction, but more than that, they were vehicles for prayer and worship. Medieval Christians would meditate over the image, projecting themselves into a Crucifixion scene at the foot of the cross, crying alongside Mary and John. They would rock a doll that represented the Christ-child and lay it in a cradle, taking on the role of Mary to feel closer to God.
The key word here is "represent." Medieval theologians and canon lawyers spent centuries erecting a difference between using representative images to aid in worshipping God and worshipping images themselves.
This was not without its critics. There was that one time in Byzantium that nobody liked to talk about afterwards. Periodically, monastic reformers would declare the lavish art and liturgy of their order's current state excessive and wasteful, and attempt to revert to a more proper vow of "poverty." Others might criticize the cynical use of famous images marketed as sites for pilgrimage--that is, oppose excessive image veneration on the grounds that it was often a fundraising effort and a spiritual scam.
Every so often, reformist movements within Latin Christendom would try to reject veneration-through-images as idolatry. Prior to Michaelangelo, the sharpest and most entrenched debate in the west was sequestered especially in England, although massive scholarly attention to the Lollards in recent decades has done a lot to qualify the picture of a unified group of iconoclastic proto-heretics.
The most famous are of course various strands of the big-R Reformation, although Michaelangelo paints Creation of Adam and the rest of the Sistine Chapel shortly before Luther mails his 95 theses off to Albrecht. One of the most striking illustrations I've seen in a history book I unfortunately can't find online, but it's is a drawing of the Basel cathedral in the 17th century after the area had adopted Calvinist/Reformed Christianity. In sharp contrast to the paintings and statues of saints and Christ and Judgment Day that adorn Catholic churches into the Baroque era, the only decorations visible in the cathedral are the coats of arms of the Swiss cantons. The painting is by Johann Sixt Ringle and can be viewed online through the Historisches Museum Basel!
But that's an extreme position (Calvin didn't even support the use of music in church, although everyone but Geneva scoffed at that during his lifetime and the Genevan church had little problem working music back in after his death). The Council of Trent, in the mid-16th century, went on to affirm (for Catholics) veneration of images. So long as the line between idolatry of images themselves and venerating the divine through images was maintained, images--including of God in God's trinitarian forms--remained permissible to orthodox Catholic Christianity.
As a follow up, where would the line between "ok" depiction and "not ok" depiction typically be drawn in this period? If depicting God is not ok, what makes depicting the Holy Spirit with symbols like the dove any different? Does the use of symbolism draw the line in this context? Are there varying degrees of acceptibilty depending on the art and its context?
Theologically in the West, images of God were justified via Augustine's renumbering of the ten commandments, although such images had been popular before him. Departing from Jewish tradition in the Septuagint, Augustine combined the first and the second commandment and interpreted the commandment to mean a prohibition against idol images (to get to 10, he split up the commandment regarding coveting). I.e. the first commandment forbids worship of other gods, and thus the prohibition on graven images is read in that context. This numbering survives today in the Catholic Church (and the Lutherans).
Interestingly, the Eastern Church decided to stick with the traditional numbering (especially since it was advocated by Origen), but justified its use of iconography by literally interpreting the commandment to forbid engraved imagery (i.e. sculptures) but not those painted on a flat surface. So Michelangelo's fresco would've been fine under that doctrine as well.
Source: MacCulloch, Christianity: The First 3000 Years
Could you say where it is stated. You appear to referring to the "commandment" which provides the summary of Exodus 20:4-6 and says 'neither to make an image/object to use as an idol nor to worship such a thing'.
Perhaps you can spell out your question, maybe you've read a particular translation that gives a different (false) sense?
If you take only the graven image part as prohibited in the same way bowing would be prohibited, it is the idolatry in this section which is ruled against.