The United States Senate passed a bill on Friday (local time) to fund the government through September 30, narrowly avoiding a shutdown just hours before the deadline, CNN reported.