Witnesses said the confrontation came after an assembly session to mark the country's Independence Day.
Military police guarding the site stood by as intruders brandishing sticks and pipes broke through the gate, AFP said.
The government promised an investigation to "establish the whole truth", and punishment for the guilty.
Venezuela has been shaken by often violent protests in recent months and is in economic crisis.
The speaker of the assembly, Julio Borges, named on Twitter five of the lawmakers injured. Some were taken away for medical treatment.