To expand on a comment by Peter Diehr:
Dirac did first introduce the notation in his paper:
Why did this notation become widely accepted in quantum mechanics? In addition to what has already suggested by Andre Eremenko, i.e. that linear algebra had not found canonical places and forms in pedagogy (see also Earliest Uses of Symbols for Matrices and Vectors), there are also reasons of popularity of Dirac's book Principles of Quantum Mechanics. See the following exposition on the historical impact of Dirac's book:
Dirac's Principles of Quantum Mechanics (PQM) hence was a hit and was widely read by both practitioners as well as used as text for students.
However, it is important to note that the modern usage of the bra-ket notation had an evolution. In fact the first two editions of Dirac's PQM did not use that notation (they appeared 1930 and 1935. Dirac rewrote his third 1947 to use the bra-ket notation. However, this edition does not yet mention the ket-bra for the outer product. This would appear in his fourth and last 1958 edition as follows (not naming it as the outer product):
Hence while the notation itself symbolically was defined by Dirac in 1939, the scope of its use and the operations it captures evolved between 1939 and 1958.
On the relationship to Grassmann's notation I am not aware that there are known historical connections from Dirac to Grassmann (has Dirac read his work, or has a adopted some of it indirectly?). The notation itself hints at this not being a direct adoption of Grassmann but an independent invention though there are some interesting aspects.
Grassmann's second book of 1862 notates [a|b] for the inner product, but it is crucial to understand that | is an operator ("Ergänzung", or supplement in Kannenberg's (2000) translation) (|a), in fact it is what we would today call the Hodge star (Hodge being a contemporary of Dirac at Cambridge).
Grassmann observes that though he had just proved that the dual gets you the inner product so there is no independent need for a new product, he recognizes that it symbolically very much looks like a product. From Kannenberg's translation (2000):
Today we would get to duality by choosing an inner product, Grassmann went the opposite direction and defined an inner product via the dual. The [] notates what Grassmann in this edition calls the combinatorial product (kombinatorisches Produkt) but today we call the exterior/wedge product, which is not the general tensor (outer) product, but only the anti-symmetric version of it. Grassmann is dealing with exterior algebra and multilinear algebra. Dirac is dealing with complex linear algebra and linear operators over Hilbert spaces.
In Dirac the |a> is very much a specific vector in Hilbert space and at the same time states in 1939 (p.417) that "the <q'|a> of the new notations appears naturally as a symbolic product." Hence the notations look symbolically very similar but their semantics is substantially different.
For these internal reasons I find it unlikely that Dirac knew of Grassmann's notation or if he did, he did not adopt its original meaning. The later addition of the outer product ket-bra is further evidence that the former of these two option is more likely.