The Garrett Morgan story is a myth that came about in the era of the "Black History Minute". Morgan, a black Cleveland inventor, did actually invent and patent a type of traffic signal, a version of the the so-called semaphore signal, but he didn't invent "the" traffic signal. The semaphore signal was invented in 1868, prior to the invention of the automobile, by a British inventor named J.P. Knight. Technically, Knight is the inventor of the traffic signal and is the correct answer to the question. The red/green electric light signal was invented by a different Cleveland inventr, James Hoge, in 1914. The standard red/yellow/green signal was invented by a Detroit police officer, William Potts, in 1920.
The story that Morgan sold his patent to GE for the "princely sum" of $40,000 appears to be a complete fabrication, although it's repeated without sourcing on a continual basis. Simply looking at the Morgan patent, which wasn't even an automatic signal, makes it highly unlikely that Morgan ever made a penny from it.A good article on the Morgan myth, with links to original source documents, may be found here:
http://web.archive.org/web/20071230032419/http://www33.brinkster.com/iiiii/trfclt/myths.html
Because the Morgan myth is so widespread, please note this link to the Morgan patent at the patent office website. The patent was filed Feb. 27, 1922, two years after the Detroit traffic signal cited above, and illustrates the weaknesses of the Morgan "invention".
https://www.google.com/patents/US1475024 (patent number 01475024)