Spokesman Col. Sansern Kaewkamnerd said the protesters broke a padlock at the gate of the compound and then pushed their way inside Friday.
He said: "They are inside the courtyard and have not entered any buildings."
The demonstrations that started Sunday have raised fears of fresh political turmoil and instability in Thailand.
They pose the biggest threat to Yingluck's administration since she came to power in 2011.
Groups of protesters were scattered around Bangkok Friday. Some are still occupying the Finance Ministry, which they stormed Monday. Others are holed up at a sprawling government office compound.Suggest a correction