Stuart Skinner made 40 saves for the Oilers (6-3-0), who have won four in a row.
Mikael Backlund and Brett Ritchie scored, and Jacob Markstrom made 22 saves for the Flames (5-2-0), who had won two in a row.
"It just wasn't good enough from the whole team," Backlund said. "We can play better than that. We can play better than that. We know that we were sloppy."
McDavid tied it 2-2 at 9:02 of the third period when he beat Markstrom short side with a sharp-angled shot after collecting a rim around the boards.
"I saw him chase the rim. Got by him," said McDavid, who has eight points (four goals, four assists) during a three-game point streak. "I think maybe he even took the long way around. I don't think I even had a shot on net yet, so I figured it was a good chance to get one on, and luckily it went in."