Pereyra's header off a centering pass from Nani went inside the left post just out of the reach of diving Union goalkeeper Andre Blake.
The tying goal came just two minutes after Philadelphia substitute Ilsinho scored the go-ahead goal off a pass from Alejandro Bedoya.
- MLS is Back Tournament group standings
- Stream MLS Is Back LIVE on ESPN networks, ESPN app (U.S. only)
Both teams already had earned a spot in the Round of 16 in the tournament that marks MLS's return to play after a more than three-month stoppage because of the coronavirus pandemic.
Philadelphia and Orlando City each went 2-0-1 in group play, having each defeated New York City FC and expansion Inter Miami. Orlando City earned the top spot because of a superior goal differential, plus-3 to plus-2 for the Union.
There was no score after a cautious first half among a pair of teams that had already advanced in the tournament.
Ilsinho came on in the 59th minute for teammate Sergio Santos and wasted little time before scoring the go-ahead goal. Bedoya flicked a pass to Ilsinho on the right side of the penalty area, and Ilsinho slid his shot inside the right post past diving Orlando City goalkeeper Pedro Gallese.
Blake was key for the Union, making six saves, including a key one off an Antonio Carlos header in the 66th minute. Gallese had three saves for Orlando City.
The Union remained unbeaten in four consecutive games. The last time they went as many games without a defeat was May 29-June 26, 2019.
Orlando City will play its Round of 16 match Saturday against an opponent to be determined, which will be a third place team from Group C, D or E. The Union also will play Saturday against the second-place team from Group C.
Orlando City win Group A with 1-1 draw vs. Union
A quick rebuttal to Philly's second-half goal sees Orlando City claim top spot in Group A. Watch MLS on ESPN+.
Ilsinho smashes Philly into the lead vs. Orlando
Major League Soccer: Ilsinho (68') Philadelphia Union 1-0 Orlando City. Watch MLS on ESPN+.