Lindholm scored his Flames-leading 20th goal of the season on a shot inside the face-off circle on the power play 39 seconds into the third period to give Calgary the 4-3 lead.
"If you can help the team win, scoring goals, or any way else, it's always fun to be a part of," Lindholm said. "As long as we're winning."
Lindholm's goal came with Oilers forward Zack Kassian serving a double-minor for roughing Flames forward Matthew Tkachuk.
"You're in a tight game," Edmonton coach Dave Tippett said. "It's 3-3. Get a number and deal with it later. Deal with winning the game. Those things happen. It's an emotional game. It's a battle. I wish we could've killed the penalty for him."
Dillon Dube scored for Calgary to tie it 3-3 at 11:34 of the second period after a failed clear by Ethan Bear.
Lindholm scored 4:04 into the first period to put Calgary up 1-0. Ryan Nugent-Hopkins tied it 1-1 at 5:07 when he took a cross-ice pass from Kailer Yamamoto on the rush.
"I thought we started a little slow with execution," Tippett said. "We were chasing it. We got that first goal and it got us engaged in the game a little bit."
McDavid made it 2-1 at 9:06 when he lifted a shot under the crossbar on a breakaway for his 25th of the season. Johnny Gaudreau tied it 2-2 at 19:19 with a wrist shot from the top of the circle that deflected off Adam Larsson.
Nugent-Hopkins put Edmonton up 3-2 at 1:24 of the second period. Yamamoto forced a Gaudreau turnover inside Calgary's blue line and passed to Nugent-Hopkins, whose shot deflected off Gaudreau's skate.
"It was unfortunate on that third goal, lost my edge, then it hit off my skate," Gaudreau said. "The boys battled back in terms of the big tying goal in the second and then our power play stepped up and found a way to win the game and then our [penalty kill] had a great kill late in the third there against a real good power play."