Downing Street made the announcement after the Queen approved the appointment.
The 52-year-old studied at Reading University and trained for the ordained ministry at Wycliffe Hall, Oxford.
She served her first curacy at Saint George and All Saints, Tufnell Park in the Diocese of London from 1994 to 1997 and was Associate Vicar from 1997 to 1999.
From 1999 to 2006 she was Vicar at Saint James the Less, Bethnal Green and Continuing Ministerial Education Officer for the Stepney Episcopal Area.
From 2006 to 2011 she was Archdeacon of Northolt in the Diocese of London.
Since 2011 she has been Archdeacon of Hackney. In 2013 she was elected as Participant Observer in the House of Bishops for the South East Region.
Rachel is married to Guy, Priest-in-Charge of two parishes in the City of London.
Her interests include conflict transformation, walking and canoeing.
She said:"It is an immense joy and privilege to be appointed as the Bishop of Gloucester. I am surprised and, I have to admit, even a little daunted by the prospect, but my overwhelming feeling is one of excitement to be coming to join with others in sharing the love of Jesus Christ with the people of this diocese.
"I am looking forward to encouraging Christians to speak out with confidence about their faith and the good news that the Gospel brings. It will be my privilege to work with churches as we connect with people, wherever they are and whatever their concerns.
"My calling to the role of bishop has been shaped by human encounter. I believe profoundly that relationship is at the heart of who God is. I have been with people through the joys and pains of their lives and it is these experiences that I will reflect upon as I take up this new role."
She replaces Bishop Michael Perham who retired from the role last November following two allegations of indecent assault.
He was interviewed under caution but was not arrested and police have since said no further action will be taken.
Venerable Rachel Treweek is the first female to be given a Diocesan bishop job which makes her the first woman eligible for a seat in the "Lords Spiritual".
She could take her place in the country's upper chamber as early as July.
A male bishop in the diocese would have to wait several years to enter the Lords but a change in the law means women are fast-tracked.
Female bishops are now first in line to succeed current "Lords Spiritual" in the upper chamber when they retire.
The Most Revd Desmond Tutu, emeritus Archbishop of Cape Town said: "What fantastic news. Wow, how wonderful so soon after Bishop Libby.
"I'm thrilled for you dear Rachel and I'm thrilled for the Diocese of Gloucester, for the Church of England, for the Church of God and for all of us. Yippee."
The Rt Revd Libby Lane, Bishop of Stockport said: "I congratulate Rachel on her nomination as Bishop of Gloucester. She is an exceptional priest whose leadership is well proven.
"She is both genuinely caring and deeply insightful. It has been an honour to serve alongside Rachel as Regional Representatives in the House of Bishops, and I rejoice that she takes her place there as of right."
The Rt Revd Martyn Snow, Bishop of Tewkesbury said: "I am looking forward to working alongside Rachel as she takes up her ministry here in the Diocese of Gloucester.
"I am certain that Rachel will offer great encouragement to people to share their own faith and the love of Jesus Christ and I pray that under her guidance, the Diocese of Gloucester will grow and thrive."
Premier's Antony Bushfield spoke to Venerable Rachel Treweek: