The phrase was coined in or about the 1860s. The idea of “down to brass tacks” meant “down to the very bottom” was originally based on the tacks in shoe/boot heels/soles.
The first appearance in print found in the January 1863 issue of a Texas newspaper, The Tri-Weekly Telegraph:
"When you come down to 'brass tacks' - if we may be allowed the expression - everybody is
governed by selfishness."
Later it came to relate to the brass-headed tacks used in furniture upholstery. But only the decorative heads of these tacks are made of brass. In order to re-upholster a chair, the upholsterer would need first to remove all the tacks and fabric coverings, thus getting down to the basic frame of the chair. This hardly seems to match the meaning as the brass tacks would be the first thing to be removed rather than the last.
A second explanation involves the practice of cloth being measured between brass tacks which were set into a shop's counter for accurate measurement. Such simple measuring devices were in use in the late 19th century - shopkeepers used brass tacks to measure the length of a piece of cloth. Brass tacks along his work table helped him measure the exact amount.
The expression is also often said to be an example of Cockney rhyming slang, meaning 'facts'. In the strange world of Cockney argot, 'tacks' does indeed rhyme with 'facts' (facks), but that's as far as it goes.
Another idea is that during the time of the Civil war, the Adjutant General of the states were required to issue an annual report. The book included a complete inventory of what is stored in the Arsenal ranging from brass canons, tar buckets, sabers, bridles, muskets. The very “Last” item on this list is “Brass Tacks”. Brass tacks were put on the soles of soldiers shoes to extend the life of the leather soles. - Pennsylvania Adjutant Generals Report - 1863
The 'fabric measuring' derivation is the strongest candidate. 'Getting down to brass tax,' as it is sometimes referred to appears to be just a misspelling.