Does ambient temperature impact gas pipe sizing?
The child's balloon is a great analogy for the gas piping system in a house. But rather than having been tied off with a knot, the neck of the balloon is still pressed to the lips of a parent with infinitely large lung capacity. (The gas piping is not a closed vessel, but is connected through the gas meter to a vast reserve of natural gas in the supplier's distribution system.) If the parent steps outdoors into a cold ambient, using their diaphragm to maintain steady air pressure inside the balloon, the balloon won't shrink. It's true the air inside the balloon will contract -- it'll become more dense as it cools -- but some of the infinite supply of air in the lungs will flow in to make up the difference and maintain the volume or size of the balloon.
What would happen if the child's balloon were not a round globe, but instead a very long tubular balloon used for making art? If just the end of the balloon were put out through the window, would the outdoor part shrink while the indoor part remained unchanged?
Pressure in a closed gas pipe system, ie where the meter is hooked up but at the moment there's no flow, will be equal at every point in the system regardless of the temperatures of various sections. The density of the gas will vary with temperature but its pressure will not.
But static pressure is not the factor that causes us to use varying sizes of pipe.
When the appliance valve at the end of the pipe opens and gas starts flowing, then yes, the strict engineering answer is that ambient temperature affects the pressure drop. Engineer's Edge provides the following equation for calculating pressure drop of a fluid flowing in a circular pipe:

The relevant piece here is rho, the density of the fluid. The density of natural gas is inversely proportional to temperature; as the gas gets colder its density increases. Because rho is in the numerator, an increase of density caused by low temperature leads to increased pressure drop in the pipe. That could make necessary an increase of pipe size.
Fortunately, for small buildings matters like lumber, wire, and pipe sizing are often handled by following prescriptive tables rather than by developing site-specific engineered solutions. Though the pipe sizing tables don't explicitly state it, I believe we are to assume that the prescriptive tables include allowances for worst-case conditions of cold temperatures, rough and rusty pipe walls, and so on.