The result left the Galaxy three points ahead of Puerto Rico - which has no more games to play -- and four points in front of Metapan.
The Salvadoran side will host the Galaxy in the group finale on October 25.
Hector Ramos scored in the 40th and 80th minutes, and Gregory Richardson added a finale in the fifth minute of injury time, to give Puerto Rico only its second win in 11 games. It was its first victory in four matches in the Champions League - the last coming nearly 14 months ago against Metapan.
Metapan had a goal by Nicolas Munoz disallowed in the 73rd minute for offside, and the Islanders needed some timely saves by reserve goalkeeper Cody Laurendi to preserve the win.
Besides, Laurendi - who was playing only his third game this season, Puerto Rico played without several regulars including leading scorer Nick Addlery, Jonathan Fana - on duty with the Dominican Republic for the Caribbean Cup, Noah Delgado and Osei Telesford.
The Islanders already had been eliminated from Champions League quarterfinal contention, but begin the North American Soccer League quarterfinals Sunday against the Minnesota Stars.
Metapan, needing at least a draw to keep its hopes alive, started faster, with Eliseo Quintanilla creating several opportunities - the most notable curling a corner kick off the cross bar in the 10th minute and a drives in the seventh and 22nd that Laurendi had to stretch to knock away.
But Puerto Rico slowly began to take control, generating chances by Josh Hansen and Tyler Wilson that required athletic efforts to block from Metapan keeper Fidel Mondragon.
After Ramos had a goal disallowed for offside in the 39th, he came back a minute later to finish when a Metapan giveway inside its defensive third landed on his foot and he dribbled into the area before finishing with a right-footed effort.
Laurendi preserved the victory by denying Jorge Ramirez in the 60th, and again in the 63rd.
Ramos added the insurance when he found himself alone just inside the penalty area, and stretched to send a low, left-footed shot past Mondragon.
The result added to an impressive record at home in the Champions League for Puerto Rico, which has lost only two of 17 games at Estadio Juan Ramon Loubriel.
The loss ended a three-game unbeaten streak in all competitions for Metapan and was its 11th loss in 12 away games in the Champions League.