It depends on usage, and it is difficult to list all the possible situations.
In the two links you gave, the first one is in a sentence ("The X is a Y ..."), but the second one is not ("X, x on the Y River in Z province, China").
The second has no verb. Encyclopedia entries sometimes just list the subject of the article at the first, without a verb since all they're doing is giving a title and perhaps a little extra definition.
The first has a verb, and is in fact a complete sentence. It would be correct either with the article or without. It is more natural to put the article there, but I don't think it's a mistake either way.
It depends on whether the article (“the”) is part of the official name, and usually it is not, such as in this case of the (not “The”) Three Gorges Dam. This can be confusing since some names are almost always used with an article, which must be capitalized at the start of a sentence.
The main exception is for book or movie titles, where it is so common that there is a special convention to move leading articles to the end for sorting purposes. For instance, “The Cat in the Hat” gets sorted as “Cat in the Hat, The”.
There are also a few weird cases such as The New York Times, which technically should be referred to as the The New York Times, but almost nobody actually does that because it sounds weird.