  We explore the relationship between two popular concepts on allocating
divisible items: competitive equilibrium (CE) and allocations with maximum Nash
welfare, i.e., allocations where the weighted geometric mean of the utilities
is maximal. When agents have homogeneous concave utility functions, these two
concepts coincide: the classical Eisenberg-Gale convex program that maximizes
Nash welfare over feasible allocations yields a competitive equilibrium.
However, these two concepts diverge for non-homogeneous utilities. From a
computational perspective, maximizing Nash welfare amounts to solving a convex
program for any concave utility functions, computing CE becomes PPAD-hard
already for separable piecewise linear concave (SPLC) utilities.
  We introduce the concept of Gale-substitute utility functions, an analogue of
the weak gross substitutes (WGS) property for the so-called Gale demand system.
For Gale-substitutes utilities, we show that any allocation maximizing Nash
welfare provides an approximate-CE with surprisingly strong guarantees, where
every agent gets at least half the maximum utility they can get at any CE, and
is approximately envy-free. Gale-substitutes include examples of utilities
where computing CE is PPAD hard: in particular, all separable concave
utilities, and the previously studied non-separable class of Leontief-free
utilities. We introduce a new, general class of utility functions called
generalized network utilities based on the generalized flow model; this class
includes SPLC and Leontief-free utilities. We show that all such utilities are
Gale-substitutes.
  Conversely, although some agents may get much higher utility at a Nash
welfare maximizing allocation than at a CE, we show a price of anarchy type
result: for general concave utilities, every CE achieves at least $(1/e)^{1/e}
> 0.69$ fraction of the maximum Nash welfare, and this factor is tight.
