The House's vote came almost two months after the Senate passed a similar bill.
The bill for the most part is consistent with a plan for NASA that President Obama set out earlier this year. Obama wants the space agency to turn launches over to private contractors, and focus less on lunar research in favor of studies into how humans can best reach the Red Planet.
"Passage of this bill represents an important step forwards toward helping us achieve the key goals set by the President," said NASA administrator Charles Bolden, in a statement.
"This important change in direction will not only help us chart a new path in space, but can help us retool for the industries and jobs of the future that will be vital for long term economic growth," said Bolton.
The budget, which will provide NASA with $19 billion next year, also funds an additional shuttle mission. The shuttle program was originally set to end in 2011 with the launch of STS-134 on February 26.
Obama outlined his vision for NASA earlier this year. The president said he believes NASA can mount a manned mission to Mars by the mid-2030s. In a controversial move, Obama also called for the space agency to turn launches over to private contractors. Critics say the plan could cost jobs in Florida, Texas, and other states that support the space program.
Obama has also called for an end to the Constellation program, which would have seen humans return to the moon in the next decade.