When speaking with a non-programmer friend, I happened to mention the concept of "beautiful code" and she wanted to understand what that meant, but I was at a bit of a loss as to how to explain it to someone who would have no context whatsoever.

When all code looks like gibberish to someone anyways, how can you explain what makes one piece of code prettier than another? Analogies could be useful too.

Language analogy

Think of your most favorite story. It is probably beautifully written. To a non-English speaker, just because they can't understand it or comprehend why it is beautiful doesn't detract from its beauty.

Construction analogy

Consider a shoddily built house. It has doors and windows that are obviously bricked over. The mortar is cracked in one corner where the foundation was insufficient. And no one can understand why there is a stairwell leading up to a 2nd floor that doesn't exist. The toilet is built next to the kitchen with no exhaust fan and situated such that the prevailing winds will blow the nasty bog odors through the rest of the house. The chimney from the open fireplace is 5cm away from some wood, ready to catch fire.

Contrast that with a house where everything is where it should be, it is low maintenance, perfectly insulated so that a bit of solar heat will keep it warm in winter, energy is recovered from the ventilation, so you have both fresh air, comfortable temperature and negligible power bills. It is built of non-flammable materials so that it can't burn down from a fire. It will withstand a 9.0 earthquake and an F5 tornado. It only costs 30% more to build than the other house, but will pay the difference off in 5 years. And it is aesthetically pleasing. 

The GUI is like the outward appearance of a house. A user can recognize beauty in a GUI, just like they can appreciate a beautiful house. But perhaps even more importantly, the real beauty in the design in both houses and programs are the things that are invisible to the uninitiated, but important or nice to have regardless.
