where did they gate or build the gates to the space bridge?
I'm assuming that you mean the gates linking the Milkyway to the Pegasus Galaxy?
They took them from unihabitied and uninhabitable worlds. Presumably the Ancients used an automated system to disperse the gates and some of the worlds for whatever reason never became fully terraformed.
What I want to know is how did they power them? Thats a lot of gates and a lot of power.
I'm wonder how you came up with the automated gate manufacturing and dispersal system. I've never heard of that.
Educated guess. Which is why I said "presumably".
In short it matches the standardized design and the locating of gates even on unused planets where the terraforming failed. It also matches the scale and method by which the terraforming was done. For the long answer see below.
We know that they used such large scale independent automation because of the method of terraforming used. The terraforming system was placed on one planet and used to affect the whole galaxy of potential targets with a generic "program" of terraforming. Not all the terraforming went right. Some planets did not develop humans, others developed
near humans (the Nox and the Salish spirits of example). This is a clear example of an automated system acting without direct supervision. A supervised system would have had attempts to correct diviations such as the evolution of the Unas or the Wraith(before they became intelligent).
The gates in each galaxy were of a uniform design, even those supposedly built and placed by the goa'uld. If the gates were built gradually and placed only on planets that had developed far enough to become useful or were interesting any directly controlled production system running for literally ages would have been tweaked and improved (as the Pegasus gate design was). A purely automated system would built the same design until reprogrammed. This is indirect evidence of the automated construction.
The goa'uld would have made at least cosmetic changes to the design if they built the gate (they like "flashy" and the gates appearance is not "flashy"). This makes me think the goa'uld did not produce new gates but either found the factory and deployed from a stockpile or relocated gates from planets they found useless (and why did the Ancients place gates on useless planets?).
Gates were placed
mostly on terraformed planets but also on planets which never became habitable and had no apparent life. Some of those locations were apparently useless and of no special interest and a gate would not have been placed there by a manned ship but an automated system might have done so on the assumption that the terraforming process would succeed. Also it appears that the Ancients never populated very many worlds in the Milkyway and had low populations. To manually place as many gates as appear to be out there by survey crews visiting each world and evaluating it as to were and whether to place a gate would be a major long term project by a large population dedicated to the process. Dedicating ships and personel would not be nearly as efficient as to use an automated dispersal pattern and fix misplaced gates as noticed by direct exploration.