When Portugese explorers landed in the area of South America we now call Brazil in the year 1500, they discovered the caesalpinia echinata tree growing there. They noticed that this tree had a similar red-coloured wood as the related Sappanwood (caesalpinia sappan) tree, native to Asia, and that a similarly-useful red dye could be extracted from this wood, so they gave the newly-discovered species the same name that they used to describe its Asian relative: pau-brasil. Pau means ‘wood’ and brasil probably derives from brasa, the Portugese word for “ember”, so pau-brasil best translates as “emberwood”. The colour of its wood was clearly known to the natives, too, who called it ibirapitanga – Tupi for, literally, “red wood”.
At this time, the Portugese called the area Ilha de Vera Cruz (“Island of the True Cross”), after the holy day on which the Portugese captain Pedro Álvares Cabral landed there. On his return trip, he discovered that Brazil was not an island but connected to a much larger continent, and renamed it Terra de Santa Cruz (“Land of the Holy Cross”). Another common name in the years that followed was come up with by Italian merchants who met with members of Cabral’s crew – Terra di Papaga (“Land of Parrots”) – which I personally think would have been an awesome name for the country.
Anyway: a group of merchants moved over to the new Portugese colony in the first decade of the 16th century in order to harvest the wood of the caesalpinia echinata trees. You see, it turned out to be even better as a source of red dye than the previously commercially-exploited caesalpinia sappan. Prior to this time, this particular kind of red dye was very popular in Europe, and could only be imported via India (which was very expensive). By being able to produce an even higher-quality dye at lower cost made the colonial Portugese merchants very rich.
The Portugese had a habit at the time of coming to name their colonies after the commercial product they exploited there: see, for example, the Ilha da Madeira, or “Maderia Island”, which literally translates as “Island of Wood”. This habit continued in their new colony too: the São Francisco River (the longest river whose entire length is in Brazil and the fourth-longest in South America) was labelled on a 1502 map as Rio D Brasil (“River of Brasil”), which was clearly a reference to the great quantity of pau-brasil trees that could be found there. By 1509, the general term for the land had become terra do Brasil daleem do mar Ociano (“land of Brazil beyond the Ocean sea”), and in 1516 the name received official recognition with the appointment by the Portugese king of the first “governor of Brasil”.
A clue to this history appears today in the name of inhabitants of Brazil, who call themselves Brasileiro: the -eiro suffix means ‘worker’, similar to putting -er on the end of an English word to get e.g. baker or hunter – clearly this refers to the use of the Tupi tribes by the Portugese as woodcutters during their colonial era (the usual Portugese suffix for ‘person who lives in’ is not -eiro but -ano).
So there you have it: the nation of Brazil is almost certainly named after a type of tree, and is the only nation in the world for which this is the case. Hope you enjoyed your history lesson, and that you continue to enjoy your stay in /r/MegaLoungeBrazil!
tl;dr: 16th century Portugese colonists and subsequent merchants named Brazil after pau-brazil, the name they gave to a type of tree that grew there, which was in turn named after a related Asian tree of the same name. When this new tree became economically valuable, they began referring to the whole area by that name, as was Portugese tradition at the time.