How did the United States gain the upper hand in the Pacific sphere during WWII?
The main way in which the United States got the upper hand in this war was through industrial might. It also gained the upper hand to some degree through intelligence and luck.
The US started to really gain the upper hand at Midway in 1942. The Midway battle was won in part because of intelligence. The US was able to read the Japanese codes and was therefore aware of the Japanese plans. That helped. But the US was also helped by pure luck and by the indecision of the Japanese leaders.
In the long term, however, the US won because of its huge superiority in industrial capacity. The US was able to produce huge numbers of aircraft and aircraft carriers. They were able to make huge numbers of cargo ships to carry materiel. The US was much more able to replace its losses than the Japanese were. They were able to simply overwhelm the Japanese with the number of warships and airplanes that they could throw at the much smaller and poorer nation.
In this way, the US was able to gain the upper hand in the Pacific in part because of industrial capacity and in part because of military factors.