The primary responsibility lies with the United States Capitol Police. In most cases they are sufficient to stop simple intruders. In 1998, two members of USCP were killed stopping a gunman
Weston walked through the metal detector, causing the alarm to go off. Chestnut requested he go back through the detector. Weston suddenly produced the gun and without warning, shot Chestnut in the back of the head at point-blank range. At this time, Officer Douglas McMillan, normally working outside the Capitol, was nearby retrieving keys to get a wheelchair for a tourist. As Weston shot Officer Chestnut, Officer McMillan immediately returned fire, causing Weston to shoot toward McMillan, wounding him.
Upon hearing the gunfire, Detective Gibson, who was in plainclothes, told the office staff to hide under their desks. Within seconds, Gibson was shot after the suspect entered DeLay's office. Despite being mortally wounded, Detective Gibson was able to return fire, and wound the suspect hitting him with 4 rounds, severely wounding him and causing him to be apprehended in that office by Officer Vincent Farri and Sergeant John Planchart.
Like any police force, the UCSP is not designed to stop a large surge of intruders (in a near-riot state). The USCP is not terribly large but does have a decent number on their force
Today, the USCP is comprised of more than 2,300 officers and civilian employees
Compare that to the DC Metro police
With approximately 3,800 officers and 600 civilian staff, it is the sixth-largest municipal police department in the United States.
What happened on Jan 6, 2021?
The USCP appears to work closely with the DC Police (which makes sense since their jurisdictions overlap). The main barricades set up to keep protesters back from the building were staffed by both USCP and DCPD (they have different insignias, and USCP were in blue jackets, while DCPD were in fluorescent yellow) Photo below from this AP article

Protesters simply overwhelmed the lines, were able to ascend to the building and broke in, where USCP then confronted protesters with gas and drawn firearms. No members of Congress were harmed. While it remains to be seen if they were ill-prepared on the front lines, the USCP clearly did its job in defending members of Congress once the mob made its way inside (i.e. the second line stopped them).
Decisions about the National Guard have to come from higher up. According to the Department of Defense, it was VP Pence and Congressional Leadership (DC does not have a governor who makes that call)
Chairman Milley and I just spoke separately with the Vice President and with Speaker Pelosi, Leader McConnell, Senator Schumer and Representative Hoyer about the situation at the U.S. Capitol. We have fully activated the D.C. National Guard to assist federal and local law enforcement as they work to peacefully address the situation. We are prepared to provide additional support as necessary and appropriate as requested by local authorities. Our people are sworn to defend the constitution and our democratic form of government and they will act accordingly.