"You know, I served well. I returned pretty well. He served great on big points, but, you know, I stuck through there," Roddick said.
The American has been seeded 30th at Wimbledon, where he has reached the finals three times.
"I'd resigned myself to the fact I wasn't going to be seeded," he said. "I mean, they can't give me credit for three years ago. I was looking forward to trying to be a spoiler. That was a new position for me."
After an early exchange of breaks, the fourth seeded Bartoli broke her opponent again to lead 3-2, but then had to recover from 0-40 as she served out the set.
In the second, Bartoli gave up just five points on serve, winning six of the final seven games.
"I played extremely well," Bartoli said. "That was probably one of the best matches I played on grass. ... Hopefully I will be able to keep it this way."
American Christina McHale failed to match the first-round performance that ousted former world No. 1 Caroline Wozniacki from the grass-court tournament, falling 7-5, 3-6, 6-4 to Anastasia Pavlyuchenkova of Russia.
Ekaterina Makarova, who ousted Wimbledon champion Petra Kvitova in the first round, advanced with a 6-4, 7-5 win over British qualifier Laura Robson. Fifth-seeded Angelique Kerber of Germany also advanced after defeating Chanelle Scheepers of South Africa 6-3, 6-2.
On the men's side, defending champion Andreas Seppi of Italy defeated Argentina's Carlos Berlocq 7-6 (2), 6-3, while second-seeded Marcel Granollers of Spain fell 6-1, 4-6, 7-6 (2) to Denis Istomin of Uzbekistan.
Seventh-seeded German Philipp Kohlschreiber overcame Britain's Jamie Baker 6-2, 3-6, 6-3. Steve Darcis of Belgium edged Marcos Baghdatis of Cyprus 6-4, 4-6, 6-4 and American Ryan Harrison beat Yen-Hsun Lu of Taiwan 6-1, 7-6 (2).