WASHINGTON—A number of Senate Democrats have indicated that they might oppose President Barack Obama's choice of Vivek Murthy for the post of U.S. Surgeon General, according to Senate aides, putting the nomination at risk over the issue of gun control.

Dr. Murthy's nomination is opposed by the National Rifle Association, the country's largest gun lobby, because he has expressed support for gun control, calling it a public-health...