In Arkham Horror, how many gates wakes the Ancient One?
See page 20 of the rulebook.  It has a table with the number of players vs. the number of open gates with the note:


  The number of open gates that will immediately awaken the
  Ancient One depends on the number of players.


For 5 players, the number is 6.  When the sixth gate is opened, the Ancient One will awaken immediately.

Gates count towards the total wherever they are.  Do remember that when playing with more than one large expansion board you should count the total number of players as one less than actual for most purposes including the number of open gates needed to awaken the ancient one.