Gneiss is a metamorphic rock that is formed when granite is subjected to extreme heat and pressure. This occurs in when:

shallow seas evaporate


mountains collide


fossil sediments form layers


magma cools and hardens underground