There has recently been much interest in the C*-algebras of directed graphs. Here we consider product systems E of directed graphs over semigroups and associated C*-algebras C*(E) and TC*(E) which generalise the higher-rank graph algebras of Kumjian-Pask and their Toeplitz analogues. We study these algebras by constructing from E a product system X(E) of Hilbert bimodules, and applying recent results of Fowler about the Toeplitz algebras of such systems. Fowler's hypotheses turn out to be very interesting graph-theoretically, and indicate new relations which will have to be added to the usual Cuntz-Krieger relations to obtain a satisfactory theory of Cuntz-Krieger algebras for product systems of graphs; our algebras C*(E) and TC*(E) are universal for families of partial isometries satisfying these relations.Our main result is a uniqueness theorem for TC*(E) which has particularly interesting implications for the C*-algebras of non-row-finite higher-rank graphs. This theorem is apparently beyond the reach of Fowler's theory, and our proof requires a detailed analysis of the expectation onto the diagonal in TC*(E).