Republican Gov. Tom Corbett's administration says Montgomery County officials are violating the state's one-man, one-woman marriage law.
However, Democratic officials in the affluent county near Philadelphia believe the state marriage law is unconstitutional.
Commonwealth Court will hear arguments on Sept. 4 in Harrisburg.
Meanwhile, a few mayors around the state are stepping into the fray.
In Western Pennsylvania, Braddock Mayor John Fetterman says he has performed several same-sex marriages at his home.
And State College Mayor Elizabeth Goreham has hosted a same-sex wedding. But she says she had a minister perform the ceremony so she would not violate her oath of office.