In Lego Harry Potter: Years 1-4 for PS3, Xbox 360, and Wii, you can unlock the gold bricks easily with cheat codes. All you have to do is go to Wiseacres Wizarding Supplies in Diagon Alley and visit the vendor upstairs. Enter the following codes to unlock the corresponding gold brick.
Gold Brick 01 — QE4VC7
Gold Brick 02 — FY8H97
Gold Brick 03 — 3MQT4P
Gold Brick 04 — PQPM7Z
Gold Brick 05 — ZY2CPA
Gold Brick 06 — 3GMTP6
Gold Brick 07 — XY6VYZ
Gold Brick 08 — TUNC4W
Gold Brick 09 — EJ42Q6
Gold Brick 10 — GFJCV9
Gold Brick 11 — DZCY6G