It appears that the definition of 2-category was introduced independently by two authors, both of whom independently introduced the modern notion of enriched category, for which 2-categories appeared as an example.
- Jean Bénabou gives 2-categories as example (5) in the 1965 paper Catégories relatives, under the name "2-catégories".
- Jean-Marie Maranda gives 2-categories as an example on the second page (p. 759) in the 1965 paper Formal categories, under the name "categories of the second type". The definition is spelled out in §2.
Both authors mention the connection to Ehresmann's double categories.
Bénabou cites his own forthcoming thesis for the concept, which was eventually published under Structures algébriques dans les catégories (which is not precisely the name mentioned in the paper). He also points the reader to Ehresmann's 1963 Catégories structurées, but the definition of 2-category does not appear here; the reference is most likely due to the similar notion of double category, of which the notion of 2-category is a special case.
Other authors, such as Eilenberg and Kelly in the 1965 paper Closed categories, also cite Ehresmann's 1963 paper for the notion of 2-category. However, as it does not appear there, it is more likely they intended to cite Ehresmann's similarly named 1965 book Catégories et structures (which is the reference currently listed on Wikipedia), which does contain a discussion of 2-categories on page 324 in a historical note.
To settle the matter, I emailed Andrée Ehresmann, who wrote:
[Charles Ehresmann] did not introduced himself 2-catégories, which have been introduced soon after both by his student Jean Bénabou as special double categories, and by different other authors as categories 'enriched' in Cat
The appearance in SGA 4 of 2-categories appears to have either been introduced during editing, or was based on word-of-mouth ideas. SGA 4, for instance, cites Monique Hakim's 1972 thesis, who introduced 2-categories by writing:
La notion de 2-catégorie est due a J. Benabou