A colleague and I were having a discussion about mathematical similarities between graphs of functions and graphs as used in graph theory: Simple graphs can be defined in terms of pair (of vertices), just as we can think of the graph a function $f$ as given by pairs $(x,f(x))$. An old HSM question, Do the words 'graphing' a function and 'graph' theory have a common ancestor?, asked if the two uses had a common ancestor, and the answers given discussed the etymology of "graph" and its relation to drawing and pictures, but didn't answer the underlying question: Were these two ideas given the same name (in English at least) because of any underlying mathematical connection, or is it just a case of the same word being used more-or-less coincidentally for two unrelated ideas? A closely related question would be who was the first to use the English word in each of the two meanings?
There was no specific mathematical connection (both representing binary relations, say) motivating the common name. Rather, the only commonality was a vague relation of both to "graphic" (pictorial) representation that the Greek root conveys. A contributing factor might have been that "diagram", as in Euclidean demonstrations, has the same root, and already Aristotle refers to diagrammatic proofs as γραφὴματα, see Acerbi, Euclid's Pseudaria. So the word was attractive to mathematicians for its venerable allusions. Ptolemy's Γεωγραφικὴ was also well-known.
In Graph theory, 1736-1936 Biggs, Lloyd and Wilson trace the first use of "graph" as in graph theory to Sylvester's note Chemistry and Algebra (1878), where he connects it to "chemicographs" of molecules (emphasis his):
"Every invariant and covariant thus becomes expressible by a graph precisely identical with a Kekulean diagram or chemicograph. But not every chemicograph is an algebraical one. I show that by an application of the algebraical law of reciprocity every algebraical graph of a given invariant will represent the constitution in terms of the roots of a quantic of a type reciprocal to that of the given invariant of an invariant belonging to that reciprocal type. I give a rule for the geometrical multiplication of graphs, i.e. for constructing a graph to the product of in- or co- variants whose separate graphs are given."
Peirce gave the same chemical motivation for his existential graphs introduced c. 1882 for predicate calculus, although they are not quite vertex-edge graphs. The term did not solidify until König's Theorie der endlichen und unendlichen Graphen (1936).
As for coordinate graphs, a manual for constructing them, but not the name, appears already in Euler's textbook Introductio in analysin infinitorum (1748) that calls graphs "curved lines". English translation of Differential and integral calculus by Lacroix (1816) still calls them just curves or curve lines. In a different context, Gaultier uses "graphical construction" in his 1813 Memoire sur les moyens generaux de construire graphiquement un cercle determine par trois conditions, and in Massau's long treatise on integration (1878-1887) aimed at engineers we read (see Tournés, Diagrams in the theory of differential equations):
"In what follows, we will always represent functions by curves; when we say to give or to find a function, it will mean giving or finding graphically the curve that represents it".
Lalanne, the inventor of logarithmic paper, called his 1880 book Méthodes graphiques pour l'expression des lois empiriques ou mathémathiques. The use of "graphical methods", so named, generally picks up in engineering applications in 1880s, see When was the earliest use of log-log plots to demonstrate power-law behavior?
One early source for the name "graph of function" is once popular Chrystal's Algebra (1886). Chrystal makes no connection to "chemicographs" of Kekule, or to Sylvester and Peirce. He ventures generically "to obtain a graphical representation of the variation of the function $f(x)$" (the expression was in the air), and then introduces the term, before using it profusely:
"To every value of the function, therefore, corresponds a representative point, $P$, whose abscissa ($OM$) and ordinate ($MP$) represent the values of the independent and dependent variables... The representative point will therefore trace out a continuous curve, such as we have drawn in Fig. 1. This curve we may call the graph of the function. It is obvious that when we know the graph of a function we can find the value of the function corresponding to any value of the independent variable $x$ with an accuracy that depends merely on the precision of our drawing instruments."