Randal Grichuk hit a slow infield grounder between third base and the mound. Anderson quickly moved to field the ball, slipped, then got up limping as a team trainer came out with manager Bob Melvin.
After a brief discussion, Anderson threw two warm-up pitches before Melvin called for reliever Yusmeiro Petit.
Anderson allowed two runs on four hits and retired eight batters.
If Anderson has to pitch against Toronto again, he might want to call in sick. His ankle injury came less than a year after he sprained his shoulder the previous time he faced the Blue Jays on May 18, 2018.
"I'll be fine,'' Anderson said after Oakland's 5-4 loss. "I'll come in tomorrow and see how it feels.''
The Associated Press contributed to this report.