Barañain is a town and municipality located in the province and autonomous community of Navarre, northern Spain.