No—and yes. It depends on the exact situation
In this short video, Jake Bruton from Aarow Building in Columbia, MO, explains how and why they transferred the roof load in a current building project using four openings to illustrate the options.
You do not need a header in a gable wall unless there is a point load supporting the ridge beam. So in the third example, Jake skipped the header. But there are two other openings in that gable wall where he was legally required to add a header to the framing.
If the opening is greater than 14 feet, you need a header
The first opening Jake explores is 14 feet, and using simple math, we can deduce that 14>8, so a header is required. Rather than packing a huge hunk of wood in the wall, which will act as a giant thermal bridge, Jake's team recesses the header into the floor framing.
Because there is already a rim joist spanning that opening, they double it up over the opening, saving a 16-foot chunk of lumber, which, in case you haven't noticed, just skyrocketed in price.
The second opening is in a perpendicular wall, so the wall carries the roof load. A header is certainly required here, but again, Jake doesn't want to add a huge thermal bridge to his envelope, so he opts to push the header into the floor framing again. His engineer specified steel because the header must carry a much heavier load than the other floor-framing header.
As far as thermal bridges go, steel is WAAAY better at being one than wood; unfortunately for steel, being a thermal bridge is bad. To combat the massive electron transport mechanism, the steel beam must be buried in insulation, spray polyurethane foam, in this case. Simple enough, but remember, the SPF must be sprayed in before the wall sheathing buries it. Otherwise, there will be a large air pocket with cold steel in there.
Back to that third example. This one is the easiest: skip the header.
If the window is more than two feet away from the floor above, you need a header.
The fourth opening is also in a gable wall, just a few feet away from the opening with no header. Even though the opening is only about three feet, it needs a header because the top of the window is more than two feet from the next horizontal surface. The header carries the weight of the wall between the window and the floor system above.
There is your answer to headers in gable walls: yes, no, and sometimes.
—Jake Bruton owns and operates AAROW BUILDING in Columbia, Missouri.