It was the fourth gold medal won by the United States in the five times that women's soccer has been contested in the Olympics. The result also gave the Americans some measure of revenge after twice surrendering the lead to Japan and falling on penalties in Germany a year ago.
Lloyd, who scored the winner in extra time to lift the United States over Brazil in the 2008 Olympic final, gave the Americans the lead in the eighth minute with a header and then doubled it in the 54th with a run out of midfield.
Yuki Ogimi pulled Japan within one in the 63rd but the United States was able to withstand a second-half surge from Japan to win their 11th straight game at the Olympic Games.
Lloyd gave the United States the in the eighth minute, finishing the work of Tobin Heath and Alex Morgan on the left side. Heath streaked down the touch line and crossed into Morgan at the near post. Morgan turned and crossed the ball to the back post, where Lloyd raced in from the top of the area to nod it in at the six.
The United States had the early play but Japan soon began to take control and hit the post twice by the 33rd minute.
Christie Rampone had to block Nahomi Kawasumi off the line in the 17th, U.S. goalkeeper Hope Solo tipped Ogimi onto the crossbar in the 18th and Ogimi put another volley off the bar in the 33rd.
The Americans were able to mount more of an offense toward the end of the half and added to its lead nine minutes into the second half. Lloyd took a ball inside the center circle and dribbled in from midfield to the edge of the penalty arc before unleashing a right-footed drive into the left side netting.
Japan soon resumed its push forward and scored when the United States was unable to clear the ball from its own area. Homare Sawa had her initial shot cleared off the line by Rampone but the rebound came back to Sawa, who served it to an unmarked Ogimi six yards from goal.
The Japanese had chances to equalize, their best when Amy LePeilbet blocked a ball with her chest off the line in the 74th, and Solo's diving block to deny Asuna Tanaka's uncontested shot from the middle of the penalty area in the 83rd.
The win gives CONCACAF two medals at the Olympics after Canada defeated France 1-0 earlier Thursday for the bronze.