Luis Matos also connected for the Orioles, who avoided their longest losing streak of the season by winning for the first time since July 18.
"I believe that we're going to pick it up," Sosa said. "There's still a long, long way to go and we still believe in ourselves."
Sosa gave Baltimore a 4-1 lead in the sixth inning with his 12th homer of the season, a two-run shot to center. He took his trademark hop out of the batter's box, but waited near first base to make sure the drive cleared the wall.
He then thrust his arm outward as the ball landed in the Baltimore bullpen. He was presented with the ball after the game and nonchalantly placed it in his locker.
"Right now is no time to celebrate. It's very nice to tie Frank Robinson, but there's still a lot of baseball left," Sosa said.
It was only his third home run since June 18, but the second in three games.
"Sammy's starting to swing the bat. He's moved his stance around a little bit," Orioles manager Lee Mazzilli said. "He isn't so closed off and isn't getting tied up on some balls."
Texas starter Kenny Rogers gave up four runs and eight hits over seven innings in what could be his final appearance before serving a suspension for shoving two TV cameramen last month. The 40-year-old went before commissioner Bud Selig on Friday to appeal the 20-game suspension handed down by Major League Baseball on July 1.
After Rogers left, James Baldwin (0-1) retired the first two batters before Lopez hit a shot to center. Lopez went 3-for-4 in his second game since returning from a two-month stint on the disabled list with a broken hand.
"The first game, I didn't help. This one, I helped the team win," he said.
Baldwin was picked up by the Rangers last month after being released by the Orioles.
"It was a fastball that moved back over the plate," he said of the pitch to Lopez. "You can't throw it down the middle. If you do, nine guys out of 10 are going to hit it hard."
B.J. Ryan recorded three outs for his 22nd save.
Baltimore starter Rodrigo Lopez allowed three runs and six hits in 6 1/3 innings, but his bid to become a 10-game winner was denied by the bullpen.
The Rangers tied it in the eighth. Mark Teixeira beat out an infield hit off Steve Kline and took second on the pitcher's errant throw. After a single by Hank Blalock, Teixeira scored on a wild pitch by Jason Grimsley (1-1).
Matthews went 3-for-4 with a homer and two doubles, and he also made a sensational leaping catch in center to rob Melvin Mora of an eighth-inning hit. But Texas lost for the sixth time in seven games to fall to 3-10 since the All-Star break.
"It just seems like that's the way things have gone for us lately," Matthews said. "Kenny's been our anchor, but it wasn't enough tonight."
In the second, Baltimore's Eli Marrero hit a drive to left that bounced off the wall toward center. Dellucci recovered in time to throw to shortstop Michael Young, whose relay to catcher Sandy Alomar ruined Marrero's bid for an inside-the-park homer.
Marrero left the game in the fourth inning after being overcome by the 98-degree heat.
Matos hit his third home run in the third to make it 2-0, and Matthews homered in the fifth to bring the Rangers within a run.
- Orioles RF Jay Gibbons was a late scratch because of back spasms. He is day-to-day.
- Dellucci drew two walks to raise his AL-leading total to 62.
- The Rangers battled the heat by wearing their batting practice jerseys, which have no names on the back.