How did the gas giants become so large?
Because gravity is the ultimate form of greed. Whoever is biggest and strongest gets the most and grows bigger and stronger still.
Gas giants started out just like "ordinary" planets, developing gradually as rocks and boulders accumulated into larger chunks -- which then attracted still more material with their greater mass.
But the would-be gas giants were favorably placed, growing where they could build an especially large accretion of rock and where there was also plenty of surrounding gas. The big, massive planets then set off a runaway effect, in which their gravity efficiently sucked in everything around them, making their mass and gravity all the stronger, until everything in the neighborhood was pulled in.
In our Solar System, of course, Jupiter is the big winner. Even among giants it's a giant, carrying more than twice as much mass as the other planets combined. The remaining outer planets concentrated enough primordial mass to get big with the "runaway" effect, but they had to settle for what they could get beyond the reach of more powerful Jupiter.