Baker struggled in 2007 spring training, opening the season with Rochester. In May, though, the Twins removed Sidney Ponson from the rotation, giving Baker a chance to start again. In his first start of the season, on May 19, he pitched into the ninth inning, allowing two runs in a 5–2 victory over the Milwaukee Brewers. On July 26, after scuffling in several starts, he struck out a career-high nine hitters over seven innings in a 12-inning, 2–1 victory over the Toronto Blue Jays. He pitched a complete game on July 1, allowing only a home run to Marcus Thames, but that run was the only run of the game in a 1–0 loss to Detroit. He threw eight shutout innings on August 5, earning the victory in a 1–0 win over the Cleveland Indians. On August 31, Baker took a perfect game into the ninth inning against the Kansas City Royals at the Hubert H. Humphrey Metrodome during the second game of a doubleheader, but lost his bid for perfection when he issued a walk to the first batter he faced in the ninth, John Buck. The second hitter after Buck that he faced, Mike Sweeney, hit a single, ending Baker's bid for a no-hitter. Baker finished the game by beating the Royals 5-0 allowing just one hit and completing his second complete game of his career. In 24 games, 23 of which were starts, Baker had a 9–9 record, a 4.26 ERA, and 102 strikeouts in innings.