Rhona Malone raised concerns about sexism within the force and said she had been through “absolute hell”.
The highly experienced officer had received an email saying two female firearms officers shouldn't be deployed together when there were sufficient male staff on duty.
In a joint statement Ms Malone and Police Scotland said a settlement had been agreed which included a payment of £947,909.07.
It said Chief Constable Iain Livingstone had personally apologised to Ms Malone for the issues highlighted during an employment tribunal.
This included the force's "poor response when a dedicated and promising officer raised legitimate concerns".
The statement added that the chief constable was committed to "leading change" in policing in Scotland to improve the experiences of women.
Ms Malone's solicitor Margaret Gribbon said the payout and statement was a watershed moment for Police Scotland.
She said: “Former Pc Malone is relieved that this long, costly, and stressful litigation is at an end.
“She and those police officers who gave evidence on her behalf performed a vital public service exposing the ugly and rampant culture of sexism and misogyny from within Police Scotland’s firearms department.
“This culture was not confined to one department since the employment tribunal found that when former Pc Malone raised her complaints of sexism and discrimination, she was victimised by staff and police officers of various ranks across multiple Police Scotland departments.
“Former Pc Malone’s case must serve as a watershed for Police Scotland.
“For former Pc Malone that must, as a bare minimum, start with Police Scotland pledging to publicise the findings and recommendations of the ongoing PSNI’s review along with the steps it intends taking to tackle sexism and misogyny from within its ranks.”
A tribunal heard last year that Ms Malone became an authorised firearms officer (AFO) in Police Scotland's ARV unit in 2016, based in Edinburgh and was one of two women in a team of 12 AFOs. Of 60 AFOs in Edinburgh's ARV division, only four were women.
The tribunal also heard a former colleague of Ms Malone was told by the chief firearms instructor that women should not become AFOs "because they menstruated and that affected their temperament".
A topless photograph of a woman was posted on a team WhatsApp group and the same senior officer referred to an investigator from watchdog the Police Investigations and Review Commissioner as “a wee lassie”.
In its judgement, the tribunal accepted evidence that there was an "absolute boys' club culture" within the ARV which was "horrific"
The tribunal said it found the evidence of a chief superintendent "implausible" and "wholly unsatisfactory" and described the actions of an HR official as "neither honest nor reliable."
Ms Malone had refused a small payout on the condition she signed a non disclosure agreement (NDA) to stop her speaking out.
Last year she described winning her tribunal as "vindication" but said Police Scotland had put her through "absolute hell."
Police Scotland said the Police Service of Northern Ireland was finalising its work on an independent review of the employment tribunal decision.