Use the buttons below each diagram to see a step-by-step walkthrough of each solution or explanation.
The right entrance is the most direct way to enter. Several sidesteps are required to pass through the gateways, going down the second middle hallway, along the left long edge, then circling clockwise, going behind the altar in the back of the temple before coming around to the front. (More comments about specific sections of the temple follow the solution below.)
You cannot open the gateway just past the left entrance, regardless of which entrance you use. Entering via either entrance, your only choice is to pass through the gateway just past the right entrance.
However, you cannot continue along the right edge of the temple. There are several ways to enter the chamber midway down the right edge, but you cannot continue along the right edge towards the altar. Your only choice is to back out, towards the entrances, and circle around along the left edge.
Once you get to the rear of the temple, there is a series of alpha tiles that alternate the state of the gateways. When you enter that area, the gateways are in the wrong state to allow you to proceed along the rear of the temple behind the altar.
The solution shows that going into the left-rear corner of the temple, using a beta tile, causes this alternating pattern to switch, allowing you to pass through the remaining gateways. The same maneuver going into the opposite left-hand corner does not cause this alternating pattern to switch.
Before showing the solution to exit the temple, notice that there are a couple of areas along the left edge of the temple that close the gateways and force you back towards the rear of the temple. This means that the way out must follow the right edge.
In order to move along the right edge, however, you need to (after a shuffle in front of the altar to open the gateways), do a complete clockwise loop around the back of the altar, following the same exact path used on the way in. Once you finish that loop, instead of making the last turn towards the altar, you can go straight. One more sidestep is necessary to keep the gateways open, then you can proceed back down the second middle hallway and exit directly through the left entrance (although you can exit through either entrance).
If you try to leave the altar (after the shuffle to open the gateways) to the right, you find the gateway going back towards the entrances is closed. Since the right rear chamber of the temple is the mirror image of the left rear chamber, you might think the same trick used on the way in (going to the right-rear beta tile to switch the alternating pattern of the gateways) might work here. Unfortunately, it does not cause the alternating pattern to switch.
The only recourse is to return to the left-rear beta tile, which can also be accomplished by circling behind the back of the altar going counterclockwise.
Finally, you cannot proceed directly out through the right entrance on the last step leaving the temple, because you encounter a series of beta tiles that close the gateways. The only way out is to proceed back down the second middle hallway.