H.R. 6791 creates a new federal grant program called the Land Port of Entry Community Infrastructure Program, administered by the Department of Homeland Security, to help fund infrastructure improvements in communities near U.S.-Mexico border crossings. The program would provide grants to state, local, and tribal governments as well as utilities to address infrastructure needs like transportation, water systems, and utilities that either support border port operations or are negatively impacted by their presence. Eligible projects fall into five categories: improving trade and travel efficiency, enhancing border security, increasing port resilience, improving quality of life for border patrol workers, and addressing community impacts like traffic congestion and pollution. The bill requires recipients to contribute at least 30 percent of project costs from non-federal sources, though this requirement can be reduced or waived for rural areas or projects deemed important for homeland security; the Secretary may also reimburse up to 70 percent of costs for projects already completed after November 2021. The bill does not specify a dollar amount but authorizes "such sums as may be necessary" and directs the Secretary to establish standardized selection criteria in consultation with other federal agencies.