It's military slang for very high ranking officers. Even though these generals and commanders make all the most important decisions that affect the troops on the ground, the infantry soldiers will never meet them face-to-face. This means that it can feel like a big unseen force is controlling what they can and can't do, so whenever a decision reaches them they have to follow, they say it came 'from the brass'.
Even though a lieutenant is a commissioned officer, he wouldn't be referred to as 'the brass', as he's on or near the frontlines giving orders in person; if the soldiers object to an order they can talk to him. But if he receives an order from his boss, who received the order from his boss, there's no room for argument.
There's no specific rank it refers to, since it doesn't matter who it came from. The order has traveled down the chain of command until your commanding officer doesn't have the authority to let you raise objections.