Entering Buckingham Palace, Clarence House and the prime minister's country house Chequers as a trespasser has become a criminal act.
Protesters have used the buildings of royals to stage events
Police could not previously make an arrest if that person agreed to be escorted off the site.
But under law which comes into force on 1 June, residences of the Queen have been added to a list of areas where trespassers can be arrested.
Offenders can be jailed for up to 12 months or fined.
The legal changes follow several high-profile incidents where Royal sites were breached by protesters.
At Windsor Castle in 2003, Aaron Barschak was arrested after gate-crashing Prince William's 21st birthday, but was not charged.
The following year Fathers 4 Justice protesters were also arrested after climbing up Buckingham Palace dressed as superheroes - they were not charged over that incident.
The designated areas include Downing St houses No 10 (the prime minister's house), No 11 (the chancellor's residence) and No 12 (the PM's press office).
Other Royal residences on the list include Windsor Castle, the Queen's Norfolk residence Sandringham and Prince Charles' Highgrove House in Gloucestershire.
Government buildings on the list include the Ministry of Defence, the Palace of Westminster and Portcullis House, which contains MPs offices, and GCHQ sites in Cornwall, Scarborough and Cheltenham.
The law change was made in the Serious Organised Crime and Police Act 2005 and amended under the Terrorism Act 2006.