Landmark legislation to curb U.S. greenhouse-gas emissions was approved by the House of Representatives in a close vote late Friday, securing an initial victory for a cornerstone of President Barack Obama's agenda.