The 39-year-old man suffered significant injuries to his lower extremities but was able to hike out on his own before the ambulance picked him up, the park said in a news release.
The man's name and details about his condition were not released.
RELATED: Video shows bear charging toward woman at Yellowstone National Park
The attack happened on Beaver Ponds Trail -- a 5-mile loop trail near Wyoming's Mammoth Hot Springs, park officials said. Most of the loop is in Wyoming, but a portion is in Montana.
The man "was hiking alone when he encountered what he believed to be two grizzly bears," and "one bear made contact with the hiker," causing the injuries, the news release said.
Linda Veress, a spokesperson for the park, told CNN the attack was a mauling. The park did not release details about what led to it.
RELATED: 10 seconds of terror: Man survives attack from 300-pound bear in remote Alaska
Beaver Ponds Trail was closed after the attack until further notice, the park said. Bear management staff were doing a sweep of the trail to ensure no other hikers were there, the news release said.
This is the first time in 2021 that a bear has injured a person at the park, park officials said.
Earlier this month, a woman in southern Colorado was killed in an apparent bear attack, officials there said.
RELATED: Human remains found in 2 bears suspected in Colorado attack