Try looking at Chapter 8.5 of the Tutorial. Basically: "buy" shares as of your books opening, setting the price to make your cost basis accurate. Or, backdate a transaction (or transactions) with the same info.
From: Chris Henderson <[hidden email]>
To: [hidden email] Sent: Monday, December 31, 2012 1:11 PM
Subject: Record initial brokerage
How do I show initial brokerage for stocks that I purchased before I
started using GnuCash?