I heard that a one horse race means a competition which one particular person or team is very likely to win because they seem much better than the other people competing. Anyone know about the origin of this expression? why one horse?
In a literally true one-horse race, the one horse that runs comes in first (and last, too, if you choose to look at it that way) because it is the only horse entered in the race. However, the term "one-horse race" is more frequently used figuratively to refer to a contest in which one of the entrants outruns the others by a huge margin or, before the race occurs, is a prohibitive favorite to win.
One early example of the post-race usage that Google Books finds occurs in California State Board of Agriculture, Transactions (1889), reporting on a race that took place in the San Joaquin Valley of California on September 19, 1888:
The second race, a district trot for three-year olds, was a “one-horse" race, Moses S winning in a go-as-you-please fashion. Two started: Grace Vernon might have been started in an opposite direction, if it was intended that she should pass Moses.
The before-the-race use of the term appears in, for example, Bailey's Magazine of Sports and Pastimes, volume 56 (1891):
Perhaps the unexpected excitement of the race, the entire alteration in the preconceived ideas of most of the spectators, the surprises, of which there were many, all tended to make the great race a memorable one. When one reflects what we all thought the [St.] Leger would turn out to be after the race for the Derby, our readers will understand our meaning. Did we not repeatedly hear the expression “a one-horse race,” and old racing men question if it was worth while to go to Doncaster to see Common romp in? And when Mimi made that inglorious exhibition at Leicester, then more than ever did the path of Common seem clear.
Writers were applying the phrase to sporting events other than horse races as early as 1892, as this account of an intramural cricket match in The Oxford Magazine (May 11, 1892) demonstrates:
The Freshmen's match was what the reporters would style a “one-horse race,” as Fry, the facile, easily carried off the honours both in the batting and bowling department. As a matter of fact, he was very lucky to secure his century on the first day, as two certainly of the catches he gave ought to have been safely held : on the third day his fifty-three was an excellent performance, as he timed the ball well, hit it hard, and ran some good runs.
One of the earliest occurrences that Google Books finds of "one-horse race" used in a non-sporting context occurs in an advertisement in The Moving Picture World, volume 18 number 7 (November 15, 1913) in which Universal Pictures quotes a congratulatory telegram it received from Washington Film Exchange:
"Can't find words to properly voice praise due to Universal program and Universal progress. This is a one-horse race. You can't lose."
One frequent situation where people refer to a "one-horse race" is in elections where a candidate on the ballot is running uncontested. This situation comes very close to the sense of being the only horse participating in a horse race. Sayyid Mir Qasim, My Life and Times (1992) offers this example:
The 1951 elections to the Constituent Assembly, held not long after the Pakistani invasion, were in fact a one-horse race: all the National Conference candidates, including me, got elected unopposed.
Update (October 18, 2019): Early occurrences in newspapers
Although the Google Books matches for "one-horse race" include an early (September 19, 1888) example from California, the Elephind database of U.S. and Australian newspapers finds 14 matches from before that date in various Australian newspapers. The oldest of these is from "Randwick Autumn Races," in the Singleton [New South Wales] Argus (April 20, 1881):
This was a simple gift to Progress, who finished about 12 lengths from the second, and about twice as many from the third horses, whom he led all round. A more uninteresting race, so called, cannot be imagined, and for once the [St.] Leger [Stakes] has failed to attract the stamp of horses which in time past have won it its popularity. Saturday's Leger was a one-horse race in the most literal sense. The other two were afforded an opportunity of watching the heels of Progress from a gradually increasing distance, all the whipping efforts of their jockeys failing to prevent their lagging behind.
I don't know whether the expression "one-horse race" originated in Australia or emigrated there from Great Britain, but it seems to have been much more widely used in Australia than in the United States during the 1880s.