Waldomiro Costa Pereira was killed after the men burst into the building in the state of Para and surrounded guards, campaigners said.
Mr Costa Pereira was an activist with the Landless Workers Movement (MST).
He frequently demonstrated in support of land reform in Brazil.
The MST wrote in a statement that it was "with immense sadness that we mourn his death" adding that the group stood "in solidarity with his wife, children and all his family in this moment of pain".
Mr Costa Pereira had been a member of the MST since 1996, participating in protests organised in favour of the redistribution of agricultural land.
The MST supports labourers in disputes with landowners by staging protests and land invasions demanding better conditions for farmers.
Violent disputes over land are common in Brazil.
According to the Pastoral Land Commission, a non-governmental organisation in Brazil, 61 land rights activists were killed last year, the highest level since 2003.
Remote rural communities frequently complain to the authorities that Brazil's security forces are rarely present to intervene in rows between powerful land owners and landless farmers.
A prominent land rights activist has been shot dead by five gunmen at a hospital in Brazil where he was recovering from a previous assassination attempt.