Lopez, who was activated from the disabled list Monday, broke a 4-4 tie with a two-out shot to left-center off of Texas reliever James Baldwin (0-1).
Sammy Sosa and Luis Matos also homered for the Orioles, who ended a six-game losing streak. Sosa's homer -- a two-run hit in the sixth -- was the 586th of his career, tying him with former Oriole Frank Robinson for fifth all-time.
Lopez was 3-for-4 and Rafael Palmeiro added a pair of hits.
Notable deaths of 2014 [PHOTOS]