Lawmakers voted 56 to 42 to approve Grenell, a former US spokesman at the United Nations and a longtime advisor for Republican political candidates.
Democrats had held up Grenell's nomination, which Trump had announced back in September.
- Merkel in Washington to make Germany heard again
- The 13 types of American you meet in Germany
- Germany expects US to impose steel and aluminium tariffs from May 1st
“The extreme partisanship displayed toward Mr. Grenell, a highly qualified nominee from President Trump, will be remembered,” Republican Senator Lindsey Graham said in a statement.
The confirmation is timely. German Chancellor Angela Merkel visits Washington on Friday for tough talk with Trump on transatlantic trade disputes and the Iran nuclear deal, and having the top US diplomatic post in Berlin empty a full 15 months into Trump's administration would have been an embarrassment.
Grenell is now among the most high-profile gay members of Trump's administration. In 2012 he worked for Mitt Romney's presidential campaign, becoming the first openly gay spokesman for a Republican presidential candidate.
He was pressured to resign that post by social conservatives.