The game was delayed at the start for more than two hours by showers and when it finally got started, the Athletics jumped to a 3-0 lead.
New York overcame its deficit with a four-run fourth, the first two runs coming on Teixeira's 24th homer of the season. Alex Rodriguez then drew a walk off losing pitcher Vin Mazzaro (2-7), stole second and scored the tying run on a double by Jorge Posada.
Eric Hinske singled in Posada with the go-ahead score. An RBI double by Teixeira and a run-scoring single by Posada gave the Yankees a 6-3 lead in the fifth.
CC Sabathia (10-6) was the beneficiary of the comeback. He went seven innings while allowing three runs on nine hits. Sabathia struck out four.
Phil Hughes, who spent part of this season as a starter, worked a perfect eighth and ninth to record his first save of the year.
The Yankees increased their lead in the American League East to 2 ½ games over idle Boston, which will carry a five-game losing streak into a home series with Baltimore beginning Friday.
Copyright 2009 by United Press International.