This is slightly oversimplifying; the attribution trail for Romeo and Juliet is fascinating. Luigi da Porto became a writer after being invalided out of his career as a soldier, and in 1524 wrote Istoria novellamente ritrovata di due nobili amanti (Newly discovered story of two noble lovers). As to how Shakespeare encountered the story, the usual version - see Da Porto, Luigi at MSN Encarta - is that the primary influence was a third-hand translation, the 1562 The Tragicall Historye of Romeus and Juliet by Arthur Brooke (also spelt Broke). The full text is on Google Books Shakespeare's Library: A Collection of the Ancient Romances, Novels, Legends, Poems, and Histories, Used by Shakespeare as the Foundation of His Dramas, John Payne Collier, T. Rodd, 1850 - which is overall extremely interesting (see the contents page) as a compendium of little-known precursors. How Romeus became Romeo discusses the texts in comparison; it's hard to disagree with its conclusion that the Brooke is pretty dull and poorly paced. For instance, Shakespeare's intro
Two households, both alike in dignity,
In fair Verona, where we lay our scene,
From ancient grudge break to new mutiny,
Where civil blood makes civil hands unclean
is masterful in its condensation of the Brooke equivalent text
THERE is beyonde the Alps, a towne of auncient fame,
Whose bright renoune yet shineth cleare, Verona men it name ;
Bylt in an happy time, bylt on a fertile soyle :
Maynteined by the heavenly fates, and by the townish toyle.
The fruitefull hilles above, the pleasant vales belowe,
The silver streame with chanel depe, that through the towne doth flow ;
The store of springes that serve for use, and eke for ease :
And other moe commodities, which profite may and please;
Eke many certayne signes of thinges betyde of olde,
To fyll the houngry eyes of those that curiously beholde ;
Doe make this towne to be preferde above the rest
Of Lumbard townes, or at the least compared with the best.
In which whyle Escalus as prince alone did raigne,
To reache rewarde unto the good, to paye the lewde with payne,
Alas (I rewe to thinke) an heavy happe befell :
Which Boccace skant (not my rude tonge) were able forth to tell.
Within my trembling hande, my penne doth shake for feare,
And, on my colde amased head, upright doth stand my heare.
But sith shee doth commaunde, whose hest I must obaye,
In moorning verse, a woful chaunce to tell I will assaye.
Helpe, learned Pallas, helpe, ye Muses with your art,
Helpe, all ye damned feends to tell of joyes retournd to smart.
Help eke ye sisters three, my skillesse pen tindyte :
For you it causd which I (alas) unable am to wryte.
There were two auncient stockes, which Fortune high did place
Above the rest, indewd with welth, and nobler of their race,
Loved of the common sort, loved of the prince alike,
And like unhappy were they both, when Fortune list to strike.
Whose prayse with equal blast, Fame in her trumpet blew ;
The one was cliped Capelet, and thother Montagew.
A wonted use it is, that men of likely sorte, (
I wot not by what furye forsd) envye eche others porte
So these, whose egall state bred envye pale of hew,
And then of grudging envyes roote, blacke hate and rancor grewe.
As of a little sparke, oft ryseth mighty fyre,
So of a kvndled sparke of grudge, in flames flashe oute theyr yre :
And then theyr deadly foode, first hatchd of trifling stryfe,
Did bathe in bloud of smarting woundes ; it reved breth and lyfe.
The Brooke version tracks back to da Porto, being a loose translation of Matteo Bandello's 1554 version (based on da Porto's). Opinion is divided over whether Brooke got it direct from the Bandello version or the 1559 French translation by Pierre Boaistuau. To make things even more complicated, da Porto's Istoria novellamente ritrovata di due nobili amanti is itself derived from an earlier text by Masuccio Salernitano (1410-1480) whose Il Novellino No. XXXIII is a short story about a doomed pair of lovers in Siena. The Salernitano, da Porto, Bandello and Shakespeare texts are conveniently bundled together in Romeo and Juliet, compiled Adolph Caso, trans. Percy Pinkerton, Branden Books, 1992, ISBN 0937832324 (Google Books allows extensive preview). In all this, however, da Porto comes out as the chief innovator in bringing the plot into its Shakespearean form; da Porto moved the setting from Siena to Verona and introduced many recognisable characters: Romeo and Giulietta from the feuding families Montecchi and Capelletti, along with a Marcuccio, Thebaldo and Friar Lorenz.
It'd be surprising if this were the end of the story. For instance, Nicholas A Patricca - see "Shakespeare in Love"—The Supressed Italian Connection - argues convincingly that Shakespeare didn't necessarily work from Brooke and could have had access to Italian sources. Patricca mentions that the Elizabethan court had strong links with the Italian Renaissance arts/literary circuit, and that Shakespeare had particular connections with John Florio and the Bassano family. Other relevant names as possible sources include François de Belleforest (whose Histoires tragiques came from Bandello) and William Painter (whose 1566/75 The Palace of Pleasure includes Romeo and Juliet.
Understanding Romeo and Juliet: A Student Casebook to Issues, Sources, and Historical Documents (Alan Hager, Greenwood Publishing Group, 1999, ISBN 0313296162, 9780313296161) goes deeper still, summarising possible narrative backgrounds in even older parted-lover stories such as Ovid's Pyramus and Thisbe (which of course Shakespeare knew, and which has the motif of one lover's suicide on mistakenly thinking the other dead) and Xenophon's complicated story of the Ephesian lovers Anthea and Habrocomes (which has the motif of feigned-death-by-potion to avoid marriage to a Perilaos - "so close in sound to Paris"). In short, Shakespeare was swimming in a sea of influences.