<PAGE>
 
                                                                     EXHIBIT 3.1


                              AMENDED AND RESTATED

                          CERTIFICATE OF INCORPORATION

                         PACIFIC GATEWAY EXCHANGE, INC.


     The following Amended and Restated Certificate of Incorporation of Pacific
Gateway Exchange, Inc. amends and restates the provisions of and supersedes the
Certificate of Incorporation filed with the Secretary of State of the State of
Delaware on August 8, 1991 in its entirety.

                                   ARTICLE I

     The name of the corporation is Pacific Gateway Exchange, Inc. (the
"Corporation").

                                  ARTICLE II

     The purpose of the Corporation is to engage in any lawful act or activity
for which corporations may be organized under the General Corporation Law of
Delaware.

                                  ARTICLE III

     The Corporation is authorized to issue two classes of stock to be
designated, respectively, "Common Stock" and "Preferred Stock."  The total
number of shares which the Corporation is authorized to issue is Twenty Six
Million (26,000,000) shares.  Twenty-Five Million (25,000,000) shares shall be
Common Stock, $.0001 par value per share, and One Million (1,000,000) shares
shall be Preferred Stock, $.0001 par value per share.

     At the effective time of this amendment and without further action on the
part of the Corporation or the holders of its stock, each One (1) share of
Common Stock of the Corporation outstanding or held in treasury immediately
prior thereto shall be changed and converted into Nine Hundred Forty (940) fully
paid and nonassessable shares of Common Stock of the Corporation, and at such
time each holder of record of Common Stock shall, without further action, be and
become the holder of Nine Hundred Forty (940) shares of Common Stock for each
one (1) share of Common Stock held of record immediately prior thereto.  No
fractional shares shall be issued as a result of such stock split and in lieu of
any fractional shares, the Corporation shall pay cash equal to such fraction
multiplied by the fair market value of the Common Stock as determined by the
Board of Directors of the Corporation.
<PAGE>
 
     The Preferred Stock may be issued from time to time in one or more series.
The Board of Directors of this Corporation is hereby authorized, within the
limitations and restrictions prescribed by law or stated in this Certificate of
Incorporation, and by filing a certificate pursuant to applicable law of the
State of Delaware, to provide for the issuance of Preferred Stock in series and
(i) to establish from time to time the number of shares to be included in each
such series; (ii) to fix the voting powers, designations, powers, preferences
and relative, participating, optional or other rights of the shares of each such
series and the qualifications, limitations or restrictions thereof, including
but not limited to, the fixing or alteration of the dividend rights, dividend
rate, conversion rights, conversion rates, voting rights, rights and terms of
redemption (including sinking fund provisions), the redemption price or prices,
and the liquidation preferences of any wholly unissued series subsequent to the
issue of shares of that series, but not below the number of shares of such
series then outstanding.  In case the number of shares of any series shall be so
decreased, the shares constituting such decrease shall resume the status which
they had prior to the adoption of the resolution originally fixing the number of
shares of such series.

                                   ARTICLE IV

     The address of the Corporation's registered office in the State of Delaware
is The Prentice-Hall Corporation System, Inc., 32 Loockerman Square, Suite 
L-100, in the City of Dover, County of Kent. The name of its registered agent at
such address is The Prentice-Hall Corporation System, Inc.

                                   ARTICLE V

     The Corporation is to have perpetual existence.

                                  ARTICLE VI

     In furtherance and not in limitation of the powers conferred by statute,
the Board of Directors is expressly authorized to make, alter, amend or repeal
the Bylaws of the Corporation.

                                  ARTICLE VII

     The number of directors which will constitute the whole Board of Directors
of the Corporation shall be as specified in the Bylaws of the Corporation.

                                 ARTICLE VIII

     The election of directors need not be by written ballot except and to the
extent provided in the Bylaws of the Corporation.

                                       2
<PAGE>
 
                                  ARTICLE IX

     Meetings of stockholders may be held within or without the State of
Delaware, as the Bylaws may provide.  The books of the Corporation may be kept
(subject to any statutory provision) outside the State of Delaware at such place
or places as may be designated from time to time by the Board of Directors or in
the Bylaws of the Corporation.

                                   ARTICLE X

     A.   To the fullest extent permitted by the Delaware General Corporation
Law as the same exists or as may hereafter be amended, a director of the
Corporation shall not be personally liable to the Corporation or its
stockholders for monetary damages for breach of fiduciary duty as a director.

     B.   The Corporation shall indemnify to the fullest extent permitted by law
any person made or threatened to be made a party to an action or proceeding,
whether criminal, civil, administrative or investigative, by reason of the fact
that he, his testator or intestate is or was a director, officer or employee of
the Corporation or any predecessor of the Corporation, or serves or served at
any other enterprise as a director, officer or employee at the request of the
Corporation or any predecessor to the Corporation.

     C.   Neither any amendment nor repeal of this Article X, nor the adoption
of any provision of this Certification of Incorporation inconsistent with this
Article X, shall eliminate or reduce the effect of this Article X in respect of
any matter occurring, or any cause of action, suit or claim that, but for this
Article X, would accrue or arise, prior to such amendment, repeal or adoption of
an inconsistent provision.

                                  ARTICLE XI

     Advance notice of new business and stockholder nominations for the election
of directors shall be given in the manner and to the extent provided in the
Bylaws of the Corporation.

                                  ARTICLE XII

     The Corporation reserves the right to amend, alter, change or repeal any
provision contained in this Certificate of Incorporation, in the manner now or
hereafter prescribed by statute, and all rights conferred upon stockholders
herein are granted subject to this reservation.

     The foregoing Amended and Restated Certificate of Incorporation has been
duly adopted by the stockholders of the corporation in accordance with the
provisions of Section 242 and 245 of the General Corporate Law of the State of
Delaware, as amended.

                                       3
<PAGE>
 
     IN WITNESS WHEREOF, the undersigned have executed this certificate on
October 18, 1995.

                                       /s/ Howard A. Neckowitz
                                       ----------------------------------
                                       Howard A. Neckowitz, President



                                       /s/ Gail Granton
                                       ----------------------------------
                                       Gail Granton, Secretary


     The undersigned certify under penalty of perjury that they have read the
foregoing Amended and Restated Certificate of Incorporation and know the
contents thereof, and that the statements therein are true.
 
     Executed at Burlingame, California on October 18, 1995.


                                       /s/ Howard A. Neckowitz
                                       ----------------------------------
                                       Howard A. Neckowitz, President



                                       /s/ Gail Granton
                                       -----------------------------------
                                       Gail Granton, Secretary

                                       4
<PAGE>
 
                           CERTIFICATE OF AMENDMENT

                                      OF

                             AMENDED AND RESTATED
                         CERTIFICATE OF INCORPORATION

                                      OF

                        PACIFIC GATEWAY EXCHANGE, INC.

                   -----------------------------------------
                   Adopted in accordance with the provisions
                   of Section 242 of the General Corporation
                         Law of the State of Delaware
                   -----------------------------------------

     I, Gail E. Granton, Secretary of PACIFIC GATEWAY EXCHANGE, INC., a 
corporation existing under the laws of the State of Delaware, do hereby certify 
as follows:

     FIRST:  That the name of the corporation is Pacific Gateway Exchange, Inc.

     SECOND:  That the Amended and Restated Certificate of Incorporation of the 
corporation was filed by the Secretary of the State of Delaware on the 10th day 
of October, 1995.

     THIRD:  That the first paragraph of Article III of the Amended and Restated
Certificate of Incorporation of said Corporation has been amended in its 
entirety to read as follows:

          "The Corporation is authorized to issue two classes of stock to be 
     designated, respectively, "Common Stock" and "Preferred Stock." The total
     number of shares which the Corporation is authorized to issue is Fifty-Five
     Million (55,000,000) shares. Fifty Million (50,000,000) shares shall be
     Common Stock, $.0001 par value per share, and Five Million (5,000,000)
     shares shall be Preferred Stock, $.0001 par value per share."
<PAGE>
 
       FOURTH:  That the Amended and Restated Certificate of Incorporation of 
said Corporation has been amended by adding a second and third paragraph to 
Article VII to read as follows:
  
             "The directors shall be divided into three classes, designated by
       Class I, Class II and Class III. At the 1997 annual meeting of
       stockholders, Class I directors shall be elected for a term expiring at
       the 1998 annual meeting of stockholders, Class II directors for a term
       expiring at the 1999 annual meeting of stockholders and Class III
       directors for a term expiring at the 2000 annual meeting of stockholders.
       At each succeeding annual meeting of stockholders, successors to
       directors whose terms expire at that annual meeting shall be of the same
       class as the directors they succeed and shall be elected for three-year
       terms. If the number of directors is decreased by resolution of the Board
       of Directors pursuant to Article II Section 2.1 of the Corporation's
       Bylaws, in no case shall that decrease shorten the term of any incumbent
       director. Vacancies in the Board of Directors may be filled by a majority
       of the directors then in office, though less than a quorum, and directors
       so chosen shall hold office for a term expiring at the next annual
       meeting of stockholders.

             Notwithstanding anything contained in this Certificate of
       Incorporation or the Corporation's Bylaws to the contrary, the
       affirmative vote of the holders of at least sixty-six and two-thirds
       percent (66 2/3%) of the outstanding shares entitled to vote shall be
       required to amend or repeal, or adopt any provision inconsistent with,
       this Article VII."

       FIFTH: That the Amended and Restated Certificate of Incorporation of said
Corporation has been amended by adding a second and third paragraph to Article
IX to read as follows:

               "No action required to be taken or which may be taken at any 
      annual or special meeting of the stockholders of the Corporation may be
      taken by stockholders without a meeting, and the power of stockholders to
      consent in writing, without a meeting, to the taking of any action is
      specifically denied.

                                       2

<PAGE>
  
          Notwithstanding anything contained in this Certificate of
     Incorporation or the Corporation's Bylaws to the contrary, the affirmative
     vote of the holders of at least sixty-six and two-thirds percent (66 2/3%)
     of the outstanding shares entitled to vote shall be required to amend or
     repeal, or adopt any provision inconsistent with, this Article IX."

     SIXTH: That such amendments have been duly adopted in accordance with the
provisions of the General Corporation Law of the State of Delaware by the
majority vote of the holders of all outstanding shares entitled to vote thereon,
all in accordance with the provisions of Section 242 of the General Corporation
Law.

     IN WITNESS WHEREOF, I have signed this certificate this 19th day of May,
1997.

                                       PACIFIC GATEWAY EXCHANGE, INC.

                                       By:  /s/ Gail E. Granton
                                            ------------------------------------
                                       Its: Secretary

                                       3