The first verse of the Kipling poem reads:
The poem was originally published in a popular magazine (McClure's) in the US. It was written specifically because after the Spanish-American War, feeling in the US was more isolationist than not. It was believed that had the US not taken over Spain's position in the Philippines, another foreign power (quite possibly Japan) would have moved into the vacuum. Kipling wrote this poem specifically to help sway popular opinion in the US, so that a "friendly" western power would hold the strategically important Philippines.
The view and the term itself are widely regarded in the modern world as racist and condescending. (See also cultural imperialism.) However, it serves a useful purpose in a historical context, making clear the prevalent attitudes at the time that allowed colonialism to proceed.
It is interesting to note the extent to which colonial powers relied upon the excuse of "civilizing" the indigenous peoples—to the point where evidence of an indigenous origin for Great Zimbabwe was largely ignored for decades after its discovery, on the presumption that the existence of a sophisticated city in subsaharan Africa prior to European colonization would pose a threat to the argument that white rule was necessary to "civilize" the area.